diff --git a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt.192 b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt.192 index b7bcf867702..fe3cdab369f 100644 --- a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt.192 +++ b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt.192 @@ -1,4 +1,4 @@ -/* +s/* * Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ @@ -31,7 +31,7 @@ import org.jetbrains.kotlin.formatter.AbstractFormatterTest import org.jetbrains.kotlin.formatter.AbstractTypingIndentationTestBase import org.jetbrains.kotlin.generators.tests.generator.TestGroup import org.jetbrains.kotlin.generators.tests.generator.muteExtraSuffix -import org.jetbrains.kotlin.generators.tests.generator.testGroup +import org.jetbrains.kotlin.generators.tests.generator.testGroupSuite import org.jetbrains.kotlin.generators.util.KT_OR_KTS import org.jetbrains.kotlin.generators.util.KT_OR_KTS_WITHOUT_DOTS_IN_NAME import org.jetbrains.kotlin.generators.util.KT_WITHOUT_DOTS_IN_NAME @@ -179,1402 +179,1404 @@ import org.jetbrains.kotlinx.serialization.AbstractSerializationIrBytecodeListin import org.jetbrains.kotlinx.serialization.AbstractSerializationPluginBytecodeListingTest import org.jetbrains.kotlinx.serialization.AbstractSerializationPluginDiagnosticTest -fun main() { +fun main(args: Array) { System.setProperty("java.awt.headless", "true") - testGroup("idea/jvm-debugger/jvm-debugger-test/test", "idea/jvm-debugger/jvm-debugger-test/testData") { - testClass { - model( - "stepping/stepIntoAndSmartStepInto", - pattern = KT_WITHOUT_DOTS_IN_NAME, - testMethod = "doStepIntoTest", - testClassName = "StepInto" - ) - model( - "stepping/stepIntoAndSmartStepInto", - pattern = KT_WITHOUT_DOTS_IN_NAME, - testMethod = "doSmartStepIntoTest", - testClassName = "SmartStepInto" - ) - model( - "stepping/stepInto", - pattern = KT_WITHOUT_DOTS_IN_NAME, - testMethod = "doStepIntoTest", - testClassName = "StepIntoOnly" - ) - model("stepping/stepOut", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepOutTest") - model("stepping/stepOver", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepOverTest") - model("stepping/filters", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepIntoTest") - model("stepping/custom", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doCustomTest") - } - - testClass { - model("evaluation/singleBreakpoint", testMethod = "doSingleBreakpointTest") - model("evaluation/multipleBreakpoints", testMethod = "doMultipleBreakpointsTest") - } - - testClass { - model("selectExpression", recursive = false) - model("selectExpression/disallowMethodCalls", testMethod = "doTestWoMethodCalls") - } - - testClass { - model("positionManager", recursive = false, extension = "kt", testClassName = "SingleFile") - model("positionManager", recursive = false, extension = null, testClassName = "MultiFile") - } - - testClass { - model("smartStepInto") - } - - testClass { - model("breakpointApplicability") - } - - testClass { - model("fileRanking") - } - - testClass { - model("asyncStackTrace") - } - - testClass { - model("coroutines") - } - - testClass { - // TODO: implement mapping logic for terminal operations - model("sequence/streams/sequence", excludeDirs = listOf("terminal")) - } - - testClass { - model("continuation") - } - - testClass { - model("xcoroutines") - } - } - - testGroup("idea/tests", "idea/testData") { - testClass { - model("resolve/additionalLazyResolve") - } - - testClass { - model("resolve/partialBodyResolve") - } - - testClass { - model("checker", recursive = false) - model("checker/regression") - model("checker/recovery") - model("checker/rendering") - model("checker/scripts", extension = "kts") - model("checker/duplicateJvmSignature") - model("checker/infos", testMethod = "doTestWithInfos") - model("checker/diagnosticsMessage") - } - - testClass { - model("kotlinAndJavaChecker/javaAgainstKotlin") - model("kotlinAndJavaChecker/javaWithKotlin") - } - - testClass { - model("kotlinAndJavaChecker/javaAgainstKotlin") - model("kotlinAndJavaChecker/javaWithKotlin") - } - - testClass { - model("kotlinAndJavaChecker/javaAgainstKotlin") - } - - testClass { - model("unifier") - } - - testClass { - model("checker/codeFragments", extension = "kt", recursive = false) - model("checker/codeFragments/imports", testMethod = "doTestWithImport", extension = "kt") - } - - testClass { - model("quickfix.special/codeFragmentAutoImport", extension = "kt", recursive = false) - } - - testClass { - model("checker/js") - } - - testClass { - model("quickfix", pattern = "^([\\w\\-_]+)\\.kt$", filenameStartsLowerCase = true) - } - - testClass { - model("navigation/gotoSuper", extension = "test", recursive = false) - } - - testClass { - model("navigation/gotoTypeDeclaration", extension = "test") - } - - testClass { - model("navigation/gotoDeclaration", extension = "test") - } - - testClass { - model( - "parameterInfo", - pattern = "^([\\w\\-_]+)\\.kt$", recursive = true, - excludeDirs = listOf("withLib1/sharedLib", "withLib2/sharedLib", "withLib3/sharedLib") - ) - } - - testClass { - model("navigation/gotoClass", testMethod = "doClassTest") - model("navigation/gotoSymbol", testMethod = "doSymbolTest") - } - - testClass(annotations = listOf(muteExtraSuffix(".libsrc"))) { - model("decompiler/navigation/usercode") - } - - testClass(annotations = listOf(muteExtraSuffix(".libsrc"))) { - model("decompiler/navigation/userJavaCode", pattern = "^(.+)\\.java$") - } - - testClass(annotations = listOf(muteExtraSuffix(".libsrcjs"))) { - model("decompiler/navigation/usercode", testClassName = "UsercodeWithJSModule") - } - - testClass { - model("decompiler/navigation/usercode") - } - - testClass { - model("navigation/implementations", recursive = false) - } - - testClass { - model("navigation/gotoTestOrCode", pattern = "^(.+)\\.main\\..+\$") - } - - testClass { - model("search/inheritance") - } - - testClass { - model("search/annotations") - } - - testClass { - model("quickfix", pattern = """^(\w+)\.((before\.Main\.\w+)|(test))$""", testMethod = "doTestWithExtraFile") - } - - testClass { - model("typealiasExpansionIndex") - } - - testClass { - model("highlighter") - } - - testClass { - model("dslHighlighter") - } - - testClass { - model("usageHighlighter") - } - - testClass { - model("folding/noCollapse") - model("folding/checkCollapse", testMethod = "doSettingsFoldingTest") - } - - testClass { - model("codeInsight/surroundWith/if", testMethod = "doTestWithIfSurrounder") - model("codeInsight/surroundWith/ifElse", testMethod = "doTestWithIfElseSurrounder") - model("codeInsight/surroundWith/ifElseExpression", testMethod = "doTestWithIfElseExpressionSurrounder") - model("codeInsight/surroundWith/ifElseExpressionBraces", testMethod = "doTestWithIfElseExpressionBracesSurrounder") - model("codeInsight/surroundWith/not", testMethod = "doTestWithNotSurrounder") - model("codeInsight/surroundWith/parentheses", testMethod = "doTestWithParenthesesSurrounder") - model("codeInsight/surroundWith/stringTemplate", testMethod = "doTestWithStringTemplateSurrounder") - model("codeInsight/surroundWith/when", testMethod = "doTestWithWhenSurrounder") - model("codeInsight/surroundWith/tryCatch", testMethod = "doTestWithTryCatchSurrounder") - model("codeInsight/surroundWith/tryCatchExpression", testMethod = "doTestWithTryCatchExpressionSurrounder") - model("codeInsight/surroundWith/tryCatchFinally", testMethod = "doTestWithTryCatchFinallySurrounder") - model("codeInsight/surroundWith/tryCatchFinallyExpression", testMethod = "doTestWithTryCatchFinallyExpressionSurrounder") - model("codeInsight/surroundWith/tryFinally", testMethod = "doTestWithTryFinallySurrounder") - model("codeInsight/surroundWith/functionLiteral", testMethod = "doTestWithFunctionLiteralSurrounder") - model("codeInsight/surroundWith/withIfExpression", testMethod = "doTestWithSurroundWithIfExpression") - model("codeInsight/surroundWith/withIfElseExpression", testMethod = "doTestWithSurroundWithIfElseExpression") - } - - testClass { - model("joinLines") - } - - testClass { - model("codeInsight/breadcrumbs") - } - - testClass { - model("intentions", pattern = "^([\\w\\-_]+)\\.(kt|kts)$") - } - - testClass { - model("intentions/loopToCallChain", pattern = "^([\\w\\-_]+)\\.kt$") - } - - testClass { - model("concatenatedStringGenerator", pattern = "^([\\w\\-_]+)\\.kt$") - } - - testClass { - model("intentions", pattern = "^(inspections\\.test)$", singleClass = true) - model("inspections", pattern = "^(inspections\\.test)$", singleClass = true) - model("inspectionsLocal", pattern = "^(inspections\\.test)$", singleClass = true) - } - - testClass { - model("inspectionsLocal", pattern = "^([\\w\\-_]+)\\.(kt|kts)$") - } - - testClass { - model("hierarchy/class/type", extension = null, recursive = false, testMethod = "doTypeClassHierarchyTest") - model("hierarchy/class/super", extension = null, recursive = false, testMethod = "doSuperClassHierarchyTest") - model("hierarchy/class/sub", extension = null, recursive = false, testMethod = "doSubClassHierarchyTest") - model("hierarchy/calls/callers", extension = null, recursive = false, testMethod = "doCallerHierarchyTest") - model("hierarchy/calls/callersJava", extension = null, recursive = false, testMethod = "doCallerJavaHierarchyTest") - model("hierarchy/calls/callees", extension = null, recursive = false, testMethod = "doCalleeHierarchyTest") - model("hierarchy/overrides", extension = null, recursive = false, testMethod = "doOverrideHierarchyTest") - } - - testClass { - model("hierarchy/withLib", extension = null, recursive = false) - } - - testClass { - model("codeInsight/moveUpDown/classBodyDeclarations", pattern = KT_OR_KTS, testMethod = "doTestClassBodyDeclaration") - model("codeInsight/moveUpDown/closingBraces", testMethod = "doTestExpression") - model("codeInsight/moveUpDown/expressions", pattern = KT_OR_KTS, testMethod = "doTestExpression") - model("codeInsight/moveUpDown/parametersAndArguments", testMethod = "doTestExpression") - model("codeInsight/moveUpDown/trailingComma", testMethod = "doTestExpressionWithTrailingComma") - } - - testClass { - model("codeInsight/moveLeftRight") - } - - testClass { - model("refactoring/inline", pattern = "^(\\w+)\\.kt$") - } - - testClass { - model("codeInsight/unwrapAndRemove/removeExpression", testMethod = "doTestExpressionRemover") - model("codeInsight/unwrapAndRemove/unwrapThen", testMethod = "doTestThenUnwrapper") - model("codeInsight/unwrapAndRemove/unwrapElse", testMethod = "doTestElseUnwrapper") - model("codeInsight/unwrapAndRemove/removeElse", testMethod = "doTestElseRemover") - model("codeInsight/unwrapAndRemove/unwrapLoop", testMethod = "doTestLoopUnwrapper") - model("codeInsight/unwrapAndRemove/unwrapTry", testMethod = "doTestTryUnwrapper") - model("codeInsight/unwrapAndRemove/unwrapCatch", testMethod = "doTestCatchUnwrapper") - model("codeInsight/unwrapAndRemove/removeCatch", testMethod = "doTestCatchRemover") - model("codeInsight/unwrapAndRemove/unwrapFinally", testMethod = "doTestFinallyUnwrapper") - model("codeInsight/unwrapAndRemove/removeFinally", testMethod = "doTestFinallyRemover") - model("codeInsight/unwrapAndRemove/unwrapLambda", testMethod = "doTestLambdaUnwrapper") - model("codeInsight/unwrapAndRemove/unwrapFunctionParameter", testMethod = "doTestFunctionParameterUnwrapper") - } - - testClass { - model("codeInsight/expressionType") - } - - testClass { - model("codeInsight/renderingKDoc") - } - - testClass { - model("editor/backspaceHandler") - } - - testClass { - model("editor/enterHandler/multilineString") - } - - testClass { - model("editor/quickDoc", pattern = """^([^_]+)\.(kt|java)$""") - } - - testClass { - model("refactoring/safeDelete/deleteClass/kotlinClass", testMethod = "doClassTest") - model("refactoring/safeDelete/deleteClass/kotlinClassWithJava", testMethod = "doClassTestWithJava") - model("refactoring/safeDelete/deleteClass/javaClassWithKotlin", extension = "java", testMethod = "doJavaClassTest") - model("refactoring/safeDelete/deleteObject/kotlinObject", testMethod = "doObjectTest") - model("refactoring/safeDelete/deleteFunction/kotlinFunction", testMethod = "doFunctionTest") - model("refactoring/safeDelete/deleteFunction/kotlinFunctionWithJava", testMethod = "doFunctionTestWithJava") - model("refactoring/safeDelete/deleteFunction/javaFunctionWithKotlin", testMethod = "doJavaMethodTest") - model("refactoring/safeDelete/deleteProperty/kotlinProperty", testMethod = "doPropertyTest") - model("refactoring/safeDelete/deleteProperty/kotlinPropertyWithJava", testMethod = "doPropertyTestWithJava") - model("refactoring/safeDelete/deleteProperty/javaPropertyWithKotlin", testMethod = "doJavaPropertyTest") - model("refactoring/safeDelete/deleteTypeAlias/kotlinTypeAlias", testMethod = "doTypeAliasTest") - model("refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter", testMethod = "doTypeParameterTest") - model("refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava", testMethod = "doTypeParameterTestWithJava") - model("refactoring/safeDelete/deleteValueParameter/kotlinValueParameter", testMethod = "doValueParameterTest") - model("refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava", testMethod = "doValueParameterTestWithJava") - } - - testClass { - model("resolve/references", pattern = KT_WITHOUT_DOTS_IN_NAME) - } - - testClass { - model("resolve/referenceInJava/binaryAndSource", extension = "java") - model("resolve/referenceInJava/sourceOnly", extension = "java") - } - - testClass { - model("resolve/referenceInJava/binaryAndSource", extension = "java") - } - - testClass { - model("resolve/referenceWithLib", recursive = false) - } - - testClass { - model("resolve/referenceInLib", recursive = false) - } - - testClass { - model("resolve/referenceToJavaWithWrongFileStructure", recursive = false) - } - - testClass { - model("findUsages/kotlin", pattern = """^(.+)\.0\.(kt|kts)$""") - model("findUsages/java", pattern = """^(.+)\.0\.java$""") - model("findUsages/propertyFiles", pattern = """^(.+)\.0\.properties$""") - } - - testClass { - model("findUsages/kotlin/conventions/components", pattern = """^(.+)\.0\.(kt|kts)$""") - } - - testClass { - model("findUsages/libraryUsages", pattern = """^(.+)\.0\.kt$""") - } - - testClass { - model("refactoring/move", extension = "test", singleClass = true) - } - - testClass { - model("refactoring/copy", extension = "test", singleClass = true) - } - - testClass { - model("refactoring/moveMultiModule", extension = "test", singleClass = true) - } - - testClass { - model("refactoring/copyMultiModule", extension = "test", singleClass = true) - } - - testClass { - model("refactoring/safeDeleteMultiModule", extension = "test", singleClass = true) - } - - testClass { - model("multiFileIntentions", extension = "test", singleClass = true, filenameStartsLowerCase = true) - } - - testClass { - model("multiFileLocalInspections", extension = "test", singleClass = true, filenameStartsLowerCase = true) - } - - testClass { - model("multiFileInspections", extension = "test", singleClass = true) - } - - testClass { - model("formatter", pattern = """^([^\.]+)\.after\.kt.*$""") - model( - "formatter/trailingComma", pattern = """^([^\.]+)\.call\.after\.kt.*$""", - testMethod = "doTestCallSite", testClassName = "FormatterCallSite" - ) - model( - "formatter", pattern = """^([^\.]+)\.after\.inv\.kt.*$""", - testMethod = "doTestInverted", testClassName = "FormatterInverted" - ) - model( - "formatter/trailingComma", pattern = """^([^\.]+)\.call\.after\.inv\.kt.*$""", - testMethod = "doTestInvertedCallSite", testClassName = "FormatterInvertedCallSite" - ) - } - - testClass { - model( - "indentationOnNewline", pattern = """^([^\.]+)\.after\.kt.*$""", testMethod = "doNewlineTest", - testClassName = "DirectSettings" - ) - model( - "indentationOnNewline", pattern = """^([^\.]+)\.after\.inv\.kt.*$""", testMethod = "doNewlineTestWithInvert", - testClassName = "InvertedSettings" - ) - } - - testClass { - model("diagnosticMessage", recursive = false) - } - - testClass { - model("diagnosticMessage/js", recursive = false, targetBackend = TargetBackend.JS) - } - - testClass { - model("refactoring/rename", extension = "test", singleClass = true) - } - - testClass { - model("refactoring/renameMultiModule", extension = "test", singleClass = true) - } - - testClass { - model("codeInsight/outOfBlock", pattern = KT_OR_KTS) - } - - testClass { - model("codeInsight/changeLocality", pattern = KT_OR_KTS) - } - - testClass { - model("dataFlowValueRendering") - } - - testClass { - model("copyPaste/conversion", pattern = """^([^\.]+)\.java$""") - } - - testClass { - model("copyPaste/plainTextConversion", pattern = """^([^\.]+)\.txt$""") - } - - testClass { - model("copyPaste/plainTextLiteral", pattern = """^([^\.]+)\.txt$""") - } - - testClass { - model("copyPaste/literal", pattern = """^([^\.]+)\.kt$""") - } - - testClass { - model( - "copyPaste/imports", - pattern = KT_WITHOUT_DOTS_IN_NAME, - testMethod = "doTestCopy", - testClassName = "Copy", - recursive = false - ) - model( - "copyPaste/imports", - pattern = KT_WITHOUT_DOTS_IN_NAME, - testMethod = "doTestCut", - testClassName = "Cut", - recursive = false - ) - } - - testClass { - model("copyPaste/moveDeclarations", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doTest") - } - - testClass { - model("copyright", pattern = KT_OR_KTS, testMethod = "doTest") - } - - testClass { - model("exitPoints") - } - - testClass { - model("codeInsight/lineMarker") - } - - testClass { - model("codeInsightInLibrary/lineMarker", testMethod = "doTestWithLibrary") - } - - testClass { - model("multiModuleLineMarker", extension = null, recursive = false) - } - - testClass { - model("shortenRefs", pattern = KT_WITHOUT_DOTS_IN_NAME) - } - testClass { - model("addImport", pattern = KT_WITHOUT_DOTS_IN_NAME) - } - - testClass { - model("addImportAlias", pattern = KT_WITHOUT_DOTS_IN_NAME) - } - - testClass { - model("smartSelection", testMethod = "doTestSmartSelection", pattern = KT_WITHOUT_DOTS_IN_NAME) - } - - testClass { - model("structureView/fileStructure", pattern = KT_WITHOUT_DOTS_IN_NAME) - } - - testClass { - model("expressionSelection", testMethod = "doTestExpressionSelection", pattern = KT_WITHOUT_DOTS_IN_NAME) - } - - testClass { - model("decompiler/decompiledText", pattern = """^([^\.]+)$""") - } - - testClass { - model("decompiler/decompiledTextJvm", pattern = """^([^\.]+)$""") - } - - testClass { - model("decompiler/decompiledText", pattern = """^([^\.]+)$""", targetBackend = TargetBackend.JS) - } - - testClass { - model("decompiler/decompiledTextJs", pattern = """^([^\.]+)$""", targetBackend = TargetBackend.JS) - } - - testClass { - model("decompiler/stubBuilder", extension = null, recursive = false) - } - - testClass { - model("editor/optimizeImports/jvm", pattern = KT_OR_KTS_WITHOUT_DOTS_IN_NAME) - model("editor/optimizeImports/common", pattern = KT_WITHOUT_DOTS_IN_NAME) - } - testClass { - model("editor/optimizeImports/js", pattern = KT_WITHOUT_DOTS_IN_NAME) - model("editor/optimizeImports/common", pattern = KT_WITHOUT_DOTS_IN_NAME) - } - - testClass { - model("debugger/exceptionFilter", pattern = """^([^\.]+)$""", recursive = false) - } - - testClass { - model("stubs", extension = "kt") - } - - testClass { - model("multiFileHighlighting", recursive = false) - } - - testClass { - model("multiModuleHighlighting/multiplatform/", recursive = false, extension = null) - } - - testClass { - model("multiplatform", recursive = false, extension = null) - } - - testClass { - model("multiModuleQuickFix", extension = null, deep = 1) - } - - testClass { - model("navigation/implementations/multiModule", recursive = false, extension = null) - } - - testClass { - model("navigation/relatedSymbols/multiModule", recursive = false, extension = null) - } - - testClass { - model("navigation/gotoSuper/multiModule", recursive = false, extension = null) - } - - testClass { - model("refactoring/introduceVariable", pattern = KT_OR_KTS, testMethod = "doIntroduceVariableTest") - model("refactoring/extractFunction", pattern = KT_OR_KTS, testMethod = "doExtractFunctionTest") - model("refactoring/introduceProperty", pattern = KT_OR_KTS, testMethod = "doIntroducePropertyTest") - model("refactoring/introduceParameter", pattern = KT_OR_KTS, testMethod = "doIntroduceSimpleParameterTest") - model("refactoring/introduceLambdaParameter", pattern = KT_OR_KTS, testMethod = "doIntroduceLambdaParameterTest") - model("refactoring/introduceJavaParameter", extension = "java", testMethod = "doIntroduceJavaParameterTest") - model("refactoring/introduceTypeParameter", pattern = KT_OR_KTS, testMethod = "doIntroduceTypeParameterTest") - model("refactoring/introduceTypeAlias", pattern = KT_OR_KTS, testMethod = "doIntroduceTypeAliasTest") - model("refactoring/extractSuperclass", pattern = KT_OR_KTS_WITHOUT_DOTS_IN_NAME, testMethod = "doExtractSuperclassTest") - model("refactoring/extractInterface", pattern = KT_OR_KTS_WITHOUT_DOTS_IN_NAME, testMethod = "doExtractInterfaceTest") - } - - testClass { - model("refactoring/pullUp/k2k", extension = "kt", singleClass = true, testClassName = "K2K", testMethod = "doKotlinTest") - model("refactoring/pullUp/k2j", extension = "kt", singleClass = true, testClassName = "K2J", testMethod = "doKotlinTest") - model("refactoring/pullUp/j2k", extension = "java", singleClass = true, testClassName = "J2K", testMethod = "doJavaTest") - } - - testClass { - model("refactoring/pushDown/k2k", extension = "kt", singleClass = true, testClassName = "K2K", testMethod = "doKotlinTest") - model("refactoring/pushDown/k2j", extension = "kt", singleClass = true, testClassName = "K2J", testMethod = "doKotlinTest") - model("refactoring/pushDown/j2k", extension = "java", singleClass = true, testClassName = "J2K", testMethod = "doJavaTest") - } - - testClass { - model("coverage/outputFiles") - } - - testClass { - model("internal/toolWindow", recursive = false, extension = null) - } - - testClass("org.jetbrains.kotlin.idea.kdoc.KdocResolveTestGenerated") { - model("kdoc/resolve") - } - - testClass { - model("kdoc/highlighting") - } - - testClass { - model("kdoc/typing") - } - - testClass { - model("codeInsight/generate/testFrameworkSupport") - } - - testClass { - model("codeInsight/generate/equalsWithHashCode") - } - - testClass { - model("codeInsight/generate/secondaryConstructors") - } - - testClass { - model("codeInsight/generate/toString") - } - - testClass { - model("repl/completion") - } - - testClass { - model("codeInsight/postfix") - } - - testClass { - model("script/definition/highlighting", extension = null, recursive = false) - model("script/definition/complex", extension = null, recursive = false, testMethod = "doComplexTest") - } - - testClass { - model("script/definition/navigation", extension = null, recursive = false) - } - - testClass { - model("script/definition/completion", extension = null, recursive = false) - } - - testClass { - model("script/definition/order", extension = null, recursive = false) - } - - testClass { - model("refactoring/nameSuggestionProvider") - } - - testClass { - model("slicer", excludeDirs = listOf("mpp")) - } - - testClass { - model("slicer/inflow", singleClass = true) - } - - testClass { - model("slicer/inflow", singleClass = true) - } - - testClass { - model("slicer/mpp", recursive = false, extension = null) - } - } - - testGroup("idea/idea-fir/tests", "idea/testData") { - testClass { - model("fir/multiModule", recursive = false, extension = null) - } - - testClass { - model("fir/lazyResolve", extension = "test", singleClass = true, filenameStartsLowerCase = true) - } - - testClass { - model("resolve/references", pattern = KT_WITHOUT_DOTS_IN_NAME) - } - - testClass { - model("checker", recursive = false) - model("checker/regression") - model("checker/recovery") - model("checker/rendering") - model("checker/duplicateJvmSignature") - model("checker/infos") - model("checker/diagnosticsMessage") - } - } - - testGroup("idea/scripting-support/test", "idea/scripting-support/testData") { - testClass { - model( - "scratch", - extension = "kts", - testMethod = "doScratchCompilingTest", - testClassName = "ScratchCompiling", - recursive = false - ) - model("scratch", extension = "kts", testMethod = "doScratchReplTest", testClassName = "ScratchRepl", recursive = false) - model( - "scratch/multiFile", - extension = null, - testMethod = "doScratchMultiFileTest", - testClassName = "ScratchMultiFile", - recursive = false - ) - - model( - "worksheet", - extension = "ws.kts", - testMethod = "doWorksheetCompilingTest", - testClassName = "WorksheetCompiling", - recursive = false - ) - model("worksheet", extension = "ws.kts", testMethod = "doWorksheetReplTest", testClassName = "WorksheetRepl", recursive = false) - model( - "worksheet/multiFile", - extension = null, - testMethod = "doWorksheetMultiFileTest", - testClassName = "WorksheetMultiFile", - recursive = false - ) - - model( - "scratch/rightPanelOutput", - extension = "kts", - testMethod = "doRightPreviewPanelOutputTest", - testClassName = "ScratchRightPanelOutput", - recursive = false - ) - } - - testClass { - model("scratch/lineMarker", testMethod = "doScratchTest", pattern = KT_OR_KTS) - } - } - - testGroup("idea/idea-maven/test", "idea/idea-maven/testData") { - testClass { - model("configurator/jvm", extension = null, recursive = false, testMethod = "doTestWithMaven") - model("configurator/js", extension = null, recursive = false, testMethod = "doTestWithJSMaven") - } - - testClass { - model("maven-inspections", pattern = "^([\\w\\-]+).xml$", singleClass = true) - } - } - - testGroup("idea/idea-gradle/tests", "idea/testData") { - testClass { - model("configuration/gradle", extension = null, recursive = false, testMethod = "doTestGradle") - model("configuration/gsk", extension = null, recursive = false, testMethod = "doTestGradle") - } - } - - testGroup("idea/tests", "compiler/testData") { - testClass { - model("loadJava/compiledKotlin") - } - - testClass { - model("loadJava/compiledKotlin", testMethod = "doTestCompiledKotlin") - } - - testClass { - model("asJava/lightClasses", excludeDirs = listOf("delegation", "script"), pattern = KT_WITHOUT_DOTS_IN_NAME) - } - - testClass { - model("asJava/script/ide", pattern = KT_OR_KTS_WITHOUT_DOTS_IN_NAME) - } - - testClass { - model("asJava/lightClasses", pattern = KT_OR_KTS) - } - testClass { - model("asJava/ultraLightClasses", pattern = KT_OR_KTS) - } - testClass { - model("asJava/ultraLightScripts", pattern = KT_OR_KTS) - } - testClass { - model("asJava/ultraLightFacades", pattern = KT_OR_KTS) - } - - testClass { - model( - "asJava/lightClasses", - excludeDirs = listOf("local", "compilationErrors", "ideRegression"), - pattern = KT_OR_KTS_WITHOUT_DOTS_IN_NAME - ) - } - } - - testGroup("idea/idea-completion/tests", "idea/idea-completion/testData") { - testClass { - model("injava", extension = "java", recursive = false) - } - - testClass { - model("injava", extension = "java", recursive = false) - } - - testClass { - model("injava/stdlib", extension = "java", recursive = false) - } - - testClass { - model("weighers/basic", pattern = KT_OR_KTS_WITHOUT_DOTS_IN_NAME) - } - - testClass { - model("weighers/smart", pattern = KT_WITHOUT_DOTS_IN_NAME) - } - - testClass { - model("basic/common") - model("basic/js") - } - - testClass { - model("basic/common") - model("basic/java") - } - - testClass { - model("smart") - } - - testClass { - model("keywords", recursive = false) - } - - testClass { - model("basic/withLib", recursive = false) - } - - testClass { - model("handlers/basic", pattern = KT_WITHOUT_DOTS_IN_NAME) - } - - testClass { - model("handlers/smart") - } - - testClass { - model("handlers/keywords") - } - - testClass { - model("handlers/charFilter", pattern = KT_WITHOUT_DOTS_IN_NAME) - } - - testClass { - model("basic/multifile", extension = null, recursive = false) - } - - testClass { - model("smartMultiFile", extension = null, recursive = false) - } - - testClass("KDocCompletionTestGenerated") { - model("kdoc") - } - - testClass { - model("basic/java8") - } - - testClass { - model("incrementalResolve") - } - - testClass { - model("multiPlatform", recursive = false, extension = null) - } - } - - testGroup( - "libraries/tools/new-project-wizard/new-project-wizard-cli/tests", - "libraries/tools/new-project-wizard/new-project-wizard-cli/testData" - ) { - testClass { - model("buildFileGeneration", recursive = false, extension = null) - } - testClass { - model("projectTemplatesBuildFileGeneration", recursive = false, extension = null) - } - } - - testGroup( - "idea/idea-new-project-wizard/tests", - "libraries/tools/new-project-wizard/new-project-wizard-cli/testData" - ) { - fun TestGroup.TestClass.allBuildSystemTests(relativeRootPath: String) { - for (testClass in listOf("GradleKts", "GradleGroovy", "Maven")) { + testGroupSuite(args) { + testGroup("idea/jvm-debugger/jvm-debugger-test/test", "idea/jvm-debugger/jvm-debugger-test/testData") { + testClass { model( - relativeRootPath, - recursive = false, + "stepping/stepIntoAndSmartStepInto", + pattern = KT_WITHOUT_DOTS_IN_NAME, + testMethod = "doStepIntoTest", + testClassName = "StepInto" + ) + model( + "stepping/stepIntoAndSmartStepInto", + pattern = KT_WITHOUT_DOTS_IN_NAME, + testMethod = "doSmartStepIntoTest", + testClassName = "SmartStepInto" + ) + model( + "stepping/stepInto", + pattern = KT_WITHOUT_DOTS_IN_NAME, + testMethod = "doStepIntoTest", + testClassName = "StepIntoOnly" + ) + model("stepping/stepOut", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepOutTest") + model("stepping/stepOver", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepOverTest") + model("stepping/filters", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepIntoTest") + model("stepping/custom", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doCustomTest") + } + + testClass { + model("evaluation/singleBreakpoint", testMethod = "doSingleBreakpointTest") + model("evaluation/multipleBreakpoints", testMethod = "doMultipleBreakpointsTest") + } + + testClass { + model("selectExpression", recursive = false) + model("selectExpression/disallowMethodCalls", testMethod = "doTestWoMethodCalls") + } + + testClass { + model("positionManager", recursive = false, extension = "kt", testClassName = "SingleFile") + model("positionManager", recursive = false, extension = null, testClassName = "MultiFile") + } + + testClass { + model("smartStepInto") + } + + testClass { + model("breakpointApplicability") + } + + testClass { + model("fileRanking") + } + + testClass { + model("asyncStackTrace") + } + + testClass { + model("coroutines") + } + + testClass { + // TODO: implement mapping logic for terminal operations + model("sequence/streams/sequence", excludeDirs = listOf("terminal")) + } + + testClass { + model("continuation") + } + + testClass { + model("xcoroutines") + } + } + + testGroup("idea/tests", "idea/testData") { + testClass { + model("resolve/additionalLazyResolve") + } + + testClass { + model("resolve/partialBodyResolve") + } + + testClass { + model("checker", recursive = false) + model("checker/regression") + model("checker/recovery") + model("checker/rendering") + model("checker/scripts", extension = "kts") + model("checker/duplicateJvmSignature") + model("checker/infos", testMethod = "doTestWithInfos") + model("checker/diagnosticsMessage") + } + + testClass { + model("kotlinAndJavaChecker/javaAgainstKotlin") + model("kotlinAndJavaChecker/javaWithKotlin") + } + + testClass { + model("kotlinAndJavaChecker/javaAgainstKotlin") + model("kotlinAndJavaChecker/javaWithKotlin") + } + + testClass { + model("kotlinAndJavaChecker/javaAgainstKotlin") + } + + testClass { + model("unifier") + } + + testClass { + model("checker/codeFragments", extension = "kt", recursive = false) + model("checker/codeFragments/imports", testMethod = "doTestWithImport", extension = "kt") + } + + testClass { + model("quickfix.special/codeFragmentAutoImport", extension = "kt", recursive = false) + } + + testClass { + model("checker/js") + } + + testClass { + model("quickfix", pattern = "^([\\w\\-_]+)\\.kt$", filenameStartsLowerCase = true) + } + + testClass { + model("navigation/gotoSuper", extension = "test", recursive = false) + } + + testClass { + model("navigation/gotoTypeDeclaration", extension = "test") + } + + testClass { + model("navigation/gotoDeclaration", extension = "test") + } + + testClass { + model( + "parameterInfo", + pattern = "^([\\w\\-_]+)\\.kt$", recursive = true, + excludeDirs = listOf("withLib1/sharedLib", "withLib2/sharedLib", "withLib3/sharedLib") + ) + } + + testClass { + model("navigation/gotoClass", testMethod = "doClassTest") + model("navigation/gotoSymbol", testMethod = "doSymbolTest") + } + + testClass(annotations = listOf(muteExtraSuffix(".libsrc"))) { + model("decompiler/navigation/usercode") + } + + testClass(annotations = listOf(muteExtraSuffix(".libsrc"))) { + model("decompiler/navigation/userJavaCode", pattern = "^(.+)\\.java$") + } + + testClass(annotations = listOf(muteExtraSuffix(".libsrcjs"))) { + model("decompiler/navigation/usercode", testClassName = "UsercodeWithJSModule") + } + + testClass { + model("decompiler/navigation/usercode") + } + + testClass { + model("navigation/implementations", recursive = false) + } + + testClass { + model("navigation/gotoTestOrCode", pattern = "^(.+)\\.main\\..+\$") + } + + testClass { + model("search/inheritance") + } + + testClass { + model("search/annotations") + } + + testClass { + model("quickfix", pattern = """^(\w+)\.((before\.Main\.\w+)|(test))$""", testMethod = "doTestWithExtraFile") + } + + testClass { + model("typealiasExpansionIndex") + } + + testClass { + model("highlighter") + } + + testClass { + model("dslHighlighter") + } + + testClass { + model("usageHighlighter") + } + + testClass { + model("folding/noCollapse") + model("folding/checkCollapse", testMethod = "doSettingsFoldingTest") + } + + testClass { + model("codeInsight/surroundWith/if", testMethod = "doTestWithIfSurrounder") + model("codeInsight/surroundWith/ifElse", testMethod = "doTestWithIfElseSurrounder") + model("codeInsight/surroundWith/ifElseExpression", testMethod = "doTestWithIfElseExpressionSurrounder") + model("codeInsight/surroundWith/ifElseExpressionBraces", testMethod = "doTestWithIfElseExpressionBracesSurrounder") + model("codeInsight/surroundWith/not", testMethod = "doTestWithNotSurrounder") + model("codeInsight/surroundWith/parentheses", testMethod = "doTestWithParenthesesSurrounder") + model("codeInsight/surroundWith/stringTemplate", testMethod = "doTestWithStringTemplateSurrounder") + model("codeInsight/surroundWith/when", testMethod = "doTestWithWhenSurrounder") + model("codeInsight/surroundWith/tryCatch", testMethod = "doTestWithTryCatchSurrounder") + model("codeInsight/surroundWith/tryCatchExpression", testMethod = "doTestWithTryCatchExpressionSurrounder") + model("codeInsight/surroundWith/tryCatchFinally", testMethod = "doTestWithTryCatchFinallySurrounder") + model("codeInsight/surroundWith/tryCatchFinallyExpression", testMethod = "doTestWithTryCatchFinallyExpressionSurrounder") + model("codeInsight/surroundWith/tryFinally", testMethod = "doTestWithTryFinallySurrounder") + model("codeInsight/surroundWith/functionLiteral", testMethod = "doTestWithFunctionLiteralSurrounder") + model("codeInsight/surroundWith/withIfExpression", testMethod = "doTestWithSurroundWithIfExpression") + model("codeInsight/surroundWith/withIfElseExpression", testMethod = "doTestWithSurroundWithIfElseExpression") + } + + testClass { + model("joinLines") + } + + testClass { + model("codeInsight/breadcrumbs") + } + + testClass { + model("intentions", pattern = "^([\\w\\-_]+)\\.(kt|kts)$") + } + + testClass { + model("intentions/loopToCallChain", pattern = "^([\\w\\-_]+)\\.kt$") + } + + testClass { + model("concatenatedStringGenerator", pattern = "^([\\w\\-_]+)\\.kt$") + } + + testClass { + model("intentions", pattern = "^(inspections\\.test)$", singleClass = true) + model("inspections", pattern = "^(inspections\\.test)$", singleClass = true) + model("inspectionsLocal", pattern = "^(inspections\\.test)$", singleClass = true) + } + + testClass { + model("inspectionsLocal", pattern = "^([\\w\\-_]+)\\.(kt|kts)$") + } + + testClass { + model("hierarchy/class/type", extension = null, recursive = false, testMethod = "doTypeClassHierarchyTest") + model("hierarchy/class/super", extension = null, recursive = false, testMethod = "doSuperClassHierarchyTest") + model("hierarchy/class/sub", extension = null, recursive = false, testMethod = "doSubClassHierarchyTest") + model("hierarchy/calls/callers", extension = null, recursive = false, testMethod = "doCallerHierarchyTest") + model("hierarchy/calls/callersJava", extension = null, recursive = false, testMethod = "doCallerJavaHierarchyTest") + model("hierarchy/calls/callees", extension = null, recursive = false, testMethod = "doCalleeHierarchyTest") + model("hierarchy/overrides", extension = null, recursive = false, testMethod = "doOverrideHierarchyTest") + } + + testClass { + model("hierarchy/withLib", extension = null, recursive = false) + } + + testClass { + model("codeInsight/moveUpDown/classBodyDeclarations", pattern = KT_OR_KTS, testMethod = "doTestClassBodyDeclaration") + model("codeInsight/moveUpDown/closingBraces", testMethod = "doTestExpression") + model("codeInsight/moveUpDown/expressions", pattern = KT_OR_KTS, testMethod = "doTestExpression") + model("codeInsight/moveUpDown/parametersAndArguments", testMethod = "doTestExpression") + model("codeInsight/moveUpDown/trailingComma", testMethod = "doTestExpressionWithTrailingComma") + } + + testClass { + model("codeInsight/moveLeftRight") + } + + testClass { + model("refactoring/inline", pattern = "^(\\w+)\\.kt$") + } + + testClass { + model("codeInsight/unwrapAndRemove/removeExpression", testMethod = "doTestExpressionRemover") + model("codeInsight/unwrapAndRemove/unwrapThen", testMethod = "doTestThenUnwrapper") + model("codeInsight/unwrapAndRemove/unwrapElse", testMethod = "doTestElseUnwrapper") + model("codeInsight/unwrapAndRemove/removeElse", testMethod = "doTestElseRemover") + model("codeInsight/unwrapAndRemove/unwrapLoop", testMethod = "doTestLoopUnwrapper") + model("codeInsight/unwrapAndRemove/unwrapTry", testMethod = "doTestTryUnwrapper") + model("codeInsight/unwrapAndRemove/unwrapCatch", testMethod = "doTestCatchUnwrapper") + model("codeInsight/unwrapAndRemove/removeCatch", testMethod = "doTestCatchRemover") + model("codeInsight/unwrapAndRemove/unwrapFinally", testMethod = "doTestFinallyUnwrapper") + model("codeInsight/unwrapAndRemove/removeFinally", testMethod = "doTestFinallyRemover") + model("codeInsight/unwrapAndRemove/unwrapLambda", testMethod = "doTestLambdaUnwrapper") + model("codeInsight/unwrapAndRemove/unwrapFunctionParameter", testMethod = "doTestFunctionParameterUnwrapper") + } + + testClass { + model("codeInsight/expressionType") + } + + testClass { + model("codeInsight/renderingKDoc") + } + + testClass { + model("editor/backspaceHandler") + } + + testClass { + model("editor/enterHandler/multilineString") + } + + testClass { + model("editor/quickDoc", pattern = """^([^_]+)\.(kt|java)$""") + } + + testClass { + model("refactoring/safeDelete/deleteClass/kotlinClass", testMethod = "doClassTest") + model("refactoring/safeDelete/deleteClass/kotlinClassWithJava", testMethod = "doClassTestWithJava") + model("refactoring/safeDelete/deleteClass/javaClassWithKotlin", extension = "java", testMethod = "doJavaClassTest") + model("refactoring/safeDelete/deleteObject/kotlinObject", testMethod = "doObjectTest") + model("refactoring/safeDelete/deleteFunction/kotlinFunction", testMethod = "doFunctionTest") + model("refactoring/safeDelete/deleteFunction/kotlinFunctionWithJava", testMethod = "doFunctionTestWithJava") + model("refactoring/safeDelete/deleteFunction/javaFunctionWithKotlin", testMethod = "doJavaMethodTest") + model("refactoring/safeDelete/deleteProperty/kotlinProperty", testMethod = "doPropertyTest") + model("refactoring/safeDelete/deleteProperty/kotlinPropertyWithJava", testMethod = "doPropertyTestWithJava") + model("refactoring/safeDelete/deleteProperty/javaPropertyWithKotlin", testMethod = "doJavaPropertyTest") + model("refactoring/safeDelete/deleteTypeAlias/kotlinTypeAlias", testMethod = "doTypeAliasTest") + model("refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter", testMethod = "doTypeParameterTest") + model("refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava", testMethod = "doTypeParameterTestWithJava") + model("refactoring/safeDelete/deleteValueParameter/kotlinValueParameter", testMethod = "doValueParameterTest") + model("refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava", testMethod = "doValueParameterTestWithJava") + } + + testClass { + model("resolve/references", pattern = KT_WITHOUT_DOTS_IN_NAME) + } + + testClass { + model("resolve/referenceInJava/binaryAndSource", extension = "java") + model("resolve/referenceInJava/sourceOnly", extension = "java") + } + + testClass { + model("resolve/referenceInJava/binaryAndSource", extension = "java") + } + + testClass { + model("resolve/referenceWithLib", recursive = false) + } + + testClass { + model("resolve/referenceInLib", recursive = false) + } + + testClass { + model("resolve/referenceToJavaWithWrongFileStructure", recursive = false) + } + + testClass { + model("findUsages/kotlin", pattern = """^(.+)\.0\.(kt|kts)$""") + model("findUsages/java", pattern = """^(.+)\.0\.java$""") + model("findUsages/propertyFiles", pattern = """^(.+)\.0\.properties$""") + } + + testClass { + model("findUsages/kotlin/conventions/components", pattern = """^(.+)\.0\.(kt|kts)$""") + } + + testClass { + model("findUsages/libraryUsages", pattern = """^(.+)\.0\.kt$""") + } + + testClass { + model("refactoring/move", extension = "test", singleClass = true) + } + + testClass { + model("refactoring/copy", extension = "test", singleClass = true) + } + + testClass { + model("refactoring/moveMultiModule", extension = "test", singleClass = true) + } + + testClass { + model("refactoring/copyMultiModule", extension = "test", singleClass = true) + } + + testClass { + model("refactoring/safeDeleteMultiModule", extension = "test", singleClass = true) + } + + testClass { + model("multiFileIntentions", extension = "test", singleClass = true, filenameStartsLowerCase = true) + } + + testClass { + model("multiFileLocalInspections", extension = "test", singleClass = true, filenameStartsLowerCase = true) + } + + testClass { + model("multiFileInspections", extension = "test", singleClass = true) + } + + testClass { + model("formatter", pattern = """^([^\.]+)\.after\.kt.*$""") + model( + "formatter/trailingComma", pattern = """^([^\.]+)\.call\.after\.kt.*$""", + testMethod = "doTestCallSite", testClassName = "FormatterCallSite" + ) + model( + "formatter", pattern = """^([^\.]+)\.after\.inv\.kt.*$""", + testMethod = "doTestInverted", testClassName = "FormatterInverted" + ) + model( + "formatter/trailingComma", pattern = """^([^\.]+)\.call\.after\.inv\.kt.*$""", + testMethod = "doTestInvertedCallSite", testClassName = "FormatterInvertedCallSite" + ) + } + + testClass { + model( + "indentationOnNewline", pattern = """^([^\.]+)\.after\.kt.*$""", testMethod = "doNewlineTest", + testClassName = "DirectSettings" + ) + model( + "indentationOnNewline", pattern = """^([^\.]+)\.after\.inv\.kt.*$""", testMethod = "doNewlineTestWithInvert", + testClassName = "InvertedSettings" + ) + } + + testClass { + model("diagnosticMessage", recursive = false) + } + + testClass { + model("diagnosticMessage/js", recursive = false, targetBackend = TargetBackend.JS) + } + + testClass { + model("refactoring/rename", extension = "test", singleClass = true) + } + + testClass { + model("refactoring/renameMultiModule", extension = "test", singleClass = true) + } + + testClass { + model("codeInsight/outOfBlock", pattern = KT_OR_KTS) + } + + testClass { + model("codeInsight/changeLocality", pattern = KT_OR_KTS) + } + + testClass { + model("dataFlowValueRendering") + } + + testClass { + model("copyPaste/conversion", pattern = """^([^\.]+)\.java$""") + } + + testClass { + model("copyPaste/plainTextConversion", pattern = """^([^\.]+)\.txt$""") + } + + testClass { + model("copyPaste/plainTextLiteral", pattern = """^([^\.]+)\.txt$""") + } + + testClass { + model("copyPaste/literal", pattern = """^([^\.]+)\.kt$""") + } + + testClass { + model( + "copyPaste/imports", + pattern = KT_WITHOUT_DOTS_IN_NAME, + testMethod = "doTestCopy", + testClassName = "Copy", + recursive = false + ) + model( + "copyPaste/imports", + pattern = KT_WITHOUT_DOTS_IN_NAME, + testMethod = "doTestCut", + testClassName = "Cut", + recursive = false + ) + } + + testClass { + model("copyPaste/moveDeclarations", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doTest") + } + + testClass { + model("copyright", pattern = KT_OR_KTS, testMethod = "doTest") + } + + testClass { + model("exitPoints") + } + + testClass { + model("codeInsight/lineMarker") + } + + testClass { + model("codeInsightInLibrary/lineMarker", testMethod = "doTestWithLibrary") + } + + testClass { + model("multiModuleLineMarker", extension = null, recursive = false) + } + + testClass { + model("shortenRefs", pattern = KT_WITHOUT_DOTS_IN_NAME) + } + testClass { + model("addImport", pattern = KT_WITHOUT_DOTS_IN_NAME) + } + + testClass { + model("addImportAlias", pattern = KT_WITHOUT_DOTS_IN_NAME) + } + + testClass { + model("smartSelection", testMethod = "doTestSmartSelection", pattern = KT_WITHOUT_DOTS_IN_NAME) + } + + testClass { + model("structureView/fileStructure", pattern = KT_WITHOUT_DOTS_IN_NAME) + } + + testClass { + model("expressionSelection", testMethod = "doTestExpressionSelection", pattern = KT_WITHOUT_DOTS_IN_NAME) + } + + testClass { + model("decompiler/decompiledText", pattern = """^([^\.]+)$""") + } + + testClass { + model("decompiler/decompiledTextJvm", pattern = """^([^\.]+)$""") + } + + testClass { + model("decompiler/decompiledText", pattern = """^([^\.]+)$""", targetBackend = TargetBackend.JS) + } + + testClass { + model("decompiler/decompiledTextJs", pattern = """^([^\.]+)$""", targetBackend = TargetBackend.JS) + } + + testClass { + model("decompiler/stubBuilder", extension = null, recursive = false) + } + + testClass { + model("editor/optimizeImports/jvm", pattern = KT_OR_KTS_WITHOUT_DOTS_IN_NAME) + model("editor/optimizeImports/common", pattern = KT_WITHOUT_DOTS_IN_NAME) + } + testClass { + model("editor/optimizeImports/js", pattern = KT_WITHOUT_DOTS_IN_NAME) + model("editor/optimizeImports/common", pattern = KT_WITHOUT_DOTS_IN_NAME) + } + + testClass { + model("debugger/exceptionFilter", pattern = """^([^\.]+)$""", recursive = false) + } + + testClass { + model("stubs", extension = "kt") + } + + testClass { + model("multiFileHighlighting", recursive = false) + } + + testClass { + model("multiModuleHighlighting/multiplatform/", recursive = false, extension = null) + } + + testClass { + model("multiplatform", recursive = false, extension = null) + } + + testClass { + model("multiModuleQuickFix", extension = null, deep = 1) + } + + testClass { + model("navigation/implementations/multiModule", recursive = false, extension = null) + } + + testClass { + model("navigation/relatedSymbols/multiModule", recursive = false, extension = null) + } + + testClass { + model("navigation/gotoSuper/multiModule", recursive = false, extension = null) + } + + testClass { + model("refactoring/introduceVariable", pattern = KT_OR_KTS, testMethod = "doIntroduceVariableTest") + model("refactoring/extractFunction", pattern = KT_OR_KTS, testMethod = "doExtractFunctionTest") + model("refactoring/introduceProperty", pattern = KT_OR_KTS, testMethod = "doIntroducePropertyTest") + model("refactoring/introduceParameter", pattern = KT_OR_KTS, testMethod = "doIntroduceSimpleParameterTest") + model("refactoring/introduceLambdaParameter", pattern = KT_OR_KTS, testMethod = "doIntroduceLambdaParameterTest") + model("refactoring/introduceJavaParameter", extension = "java", testMethod = "doIntroduceJavaParameterTest") + model("refactoring/introduceTypeParameter", pattern = KT_OR_KTS, testMethod = "doIntroduceTypeParameterTest") + model("refactoring/introduceTypeAlias", pattern = KT_OR_KTS, testMethod = "doIntroduceTypeAliasTest") + model("refactoring/extractSuperclass", pattern = KT_OR_KTS_WITHOUT_DOTS_IN_NAME, testMethod = "doExtractSuperclassTest") + model("refactoring/extractInterface", pattern = KT_OR_KTS_WITHOUT_DOTS_IN_NAME, testMethod = "doExtractInterfaceTest") + } + + testClass { + model("refactoring/pullUp/k2k", extension = "kt", singleClass = true, testClassName = "K2K", testMethod = "doKotlinTest") + model("refactoring/pullUp/k2j", extension = "kt", singleClass = true, testClassName = "K2J", testMethod = "doKotlinTest") + model("refactoring/pullUp/j2k", extension = "java", singleClass = true, testClassName = "J2K", testMethod = "doJavaTest") + } + + testClass { + model("refactoring/pushDown/k2k", extension = "kt", singleClass = true, testClassName = "K2K", testMethod = "doKotlinTest") + model("refactoring/pushDown/k2j", extension = "kt", singleClass = true, testClassName = "K2J", testMethod = "doKotlinTest") + model("refactoring/pushDown/j2k", extension = "java", singleClass = true, testClassName = "J2K", testMethod = "doJavaTest") + } + + testClass { + model("coverage/outputFiles") + } + + testClass { + model("internal/toolWindow", recursive = false, extension = null) + } + + testClass("org.jetbrains.kotlin.idea.kdoc.KdocResolveTestGenerated") { + model("kdoc/resolve") + } + + testClass { + model("kdoc/highlighting") + } + + testClass { + model("kdoc/typing") + } + + testClass { + model("codeInsight/generate/testFrameworkSupport") + } + + testClass { + model("codeInsight/generate/equalsWithHashCode") + } + + testClass { + model("codeInsight/generate/secondaryConstructors") + } + + testClass { + model("codeInsight/generate/toString") + } + + testClass { + model("repl/completion") + } + + testClass { + model("codeInsight/postfix") + } + + testClass { + model("script/definition/highlighting", extension = null, recursive = false) + model("script/definition/complex", extension = null, recursive = false, testMethod = "doComplexTest") + } + + testClass { + model("script/definition/navigation", extension = null, recursive = false) + } + + testClass { + model("script/definition/completion", extension = null, recursive = false) + } + + testClass { + model("script/definition/order", extension = null, recursive = false) + } + + testClass { + model("refactoring/nameSuggestionProvider") + } + + testClass { + model("slicer", excludeDirs = listOf("mpp")) + } + + testClass { + model("slicer/inflow", singleClass = true) + } + + testClass { + model("slicer/inflow", singleClass = true) + } + + testClass { + model("slicer/mpp", recursive = false, extension = null) + } + } + + testGroup("idea/idea-fir/tests", "idea/testData") { + testClass { + model("fir/multiModule", recursive = false, extension = null) + } + + testClass { + model("fir/lazyResolve", extension = "test", singleClass = true, filenameStartsLowerCase = true) + } + + testClass { + model("resolve/references", pattern = KT_WITHOUT_DOTS_IN_NAME) + } + + testClass { + model("checker", recursive = false) + model("checker/regression") + model("checker/recovery") + model("checker/rendering") + model("checker/duplicateJvmSignature") + model("checker/infos") + model("checker/diagnosticsMessage") + } + } + + testGroup("idea/scripting-support/test", "idea/scripting-support/testData") { + testClass { + model( + "scratch", + extension = "kts", + testMethod = "doScratchCompilingTest", + testClassName = "ScratchCompiling", + recursive = false + ) + model("scratch", extension = "kts", testMethod = "doScratchReplTest", testClassName = "ScratchRepl", recursive = false) + model( + "scratch/multiFile", extension = null, - testMethod = "doTest${testClass}", - testClassName = testClass + testMethod = "doScratchMultiFileTest", + testClassName = "ScratchMultiFile", + recursive = false + ) + + model( + "worksheet", + extension = "ws.kts", + testMethod = "doWorksheetCompilingTest", + testClassName = "WorksheetCompiling", + recursive = false + ) + model("worksheet", extension = "ws.kts", testMethod = "doWorksheetReplTest", testClassName = "WorksheetRepl", recursive = false) + model( + "worksheet/multiFile", + extension = null, + testMethod = "doWorksheetMultiFileTest", + testClassName = "WorksheetMultiFile", + recursive = false + ) + + model( + "scratch/rightPanelOutput", + extension = "kts", + testMethod = "doRightPreviewPanelOutputTest", + testClassName = "ScratchRightPanelOutput", + recursive = false + ) + } + + testClass { + model("scratch/lineMarker", testMethod = "doScratchTest", pattern = KT_OR_KTS) + } + } + + testGroup("idea/idea-maven/test", "idea/idea-maven/testData") { + testClass { + model("configurator/jvm", extension = null, recursive = false, testMethod = "doTestWithMaven") + model("configurator/js", extension = null, recursive = false, testMethod = "doTestWithJSMaven") + } + + testClass { + model("maven-inspections", pattern = "^([\\w\\-]+).xml$", singleClass = true) + } + } + + testGroup("idea/idea-gradle/tests", "idea/testData") { + testClass { + model("configuration/gradle", extension = null, recursive = false, testMethod = "doTestGradle") + model("configuration/gsk", extension = null, recursive = false, testMethod = "doTestGradle") + } + } + + testGroup("idea/tests", "compiler/testData") { + testClass { + model("loadJava/compiledKotlin") + } + + testClass { + model("loadJava/compiledKotlin", testMethod = "doTestCompiledKotlin") + } + + testClass { + model("asJava/lightClasses", excludeDirs = listOf("delegation", "script"), pattern = KT_WITHOUT_DOTS_IN_NAME) + } + + testClass { + model("asJava/script/ide", pattern = KT_OR_KTS_WITHOUT_DOTS_IN_NAME) + } + + testClass { + model("asJava/lightClasses", pattern = KT_OR_KTS) + } + testClass { + model("asJava/ultraLightClasses", pattern = KT_OR_KTS) + } + testClass { + model("asJava/ultraLightScripts", pattern = KT_OR_KTS) + } + testClass { + model("asJava/ultraLightFacades", pattern = KT_OR_KTS) + } + + testClass { + model( + "asJava/lightClasses", + excludeDirs = listOf("local", "compilationErrors", "ideRegression"), + pattern = KT_OR_KTS_WITHOUT_DOTS_IN_NAME ) } } - testClass { - allBuildSystemTests("buildFileGeneration") + + testGroup("idea/idea-completion/tests", "idea/idea-completion/testData") { + testClass { + model("injava", extension = "java", recursive = false) + } + + testClass { + model("injava", extension = "java", recursive = false) + } + + testClass { + model("injava/stdlib", extension = "java", recursive = false) + } + + testClass { + model("weighers/basic", pattern = KT_OR_KTS_WITHOUT_DOTS_IN_NAME) + } + + testClass { + model("weighers/smart", pattern = KT_WITHOUT_DOTS_IN_NAME) + } + + testClass { + model("basic/common") + model("basic/js") + } + + testClass { + model("basic/common") + model("basic/java") + } + + testClass { + model("smart") + } + + testClass { + model("keywords", recursive = false) + } + + testClass { + model("basic/withLib", recursive = false) + } + + testClass { + model("handlers/basic", pattern = KT_WITHOUT_DOTS_IN_NAME) + } + + testClass { + model("handlers/smart") + } + + testClass { + model("handlers/keywords") + } + + testClass { + model("handlers/charFilter", pattern = KT_WITHOUT_DOTS_IN_NAME) + } + + testClass { + model("basic/multifile", extension = null, recursive = false) + } + + testClass { + model("smartMultiFile", extension = null, recursive = false) + } + + testClass("KDocCompletionTestGenerated") { + model("kdoc") + } + + testClass { + model("basic/java8") + } + + testClass { + model("incrementalResolve") + } + + testClass { + model("multiPlatform", recursive = false, extension = null) + } } - testClass { - allBuildSystemTests("projectTemplatesBuildFileGeneration") + + testGroup( + "libraries/tools/new-project-wizard/new-project-wizard-cli/tests", + "libraries/tools/new-project-wizard/new-project-wizard-cli/testData" + ) { + testClass { + model("buildFileGeneration", recursive = false, extension = null) + } + testClass { + model("projectTemplatesBuildFileGeneration", recursive = false, extension = null) + } } + + testGroup( + "idea/idea-new-project-wizard/tests", + "libraries/tools/new-project-wizard/new-project-wizard-cli/testData" + ) { + fun TestGroup.TestClass.allBuildSystemTests(relativeRootPath: String) { + for (testClass in listOf("GradleKts", "GradleGroovy", "Maven")) { + model( + relativeRootPath, + recursive = false, + extension = null, + testMethod = "doTest${testClass}", + testClassName = testClass + ) + } + } + testClass { + allBuildSystemTests("buildFileGeneration") + } + testClass { + allBuildSystemTests("projectTemplatesBuildFileGeneration") + } + } + + //TODO: move these tests into idea-completion module + testGroup("idea/tests", "idea/idea-completion/testData") { + testClass { + model("handlers/runtimeCast") + } + + testClass { + model("basic/codeFragments", extension = "kt") + } + } + + testGroup("j2k/tests", "j2k/testData") { + testClass { + model("fileOrElement", extension = "java") + } + } + testGroup("j2k/tests", "j2k/testData") { + testClass { + model("multiFile", extension = null, recursive = false) + } + } + testGroup("j2k/tests", "j2k/testData") { + testClass { + model("fileOrElement", extension = "java") + } + } + + testGroup("nj2k/tests", "nj2k/testData") { + testClass { + model("newJ2k", pattern = """^([^\.]+)\.java$""") + } + testClass { + model("inference/common") + } + testClass { + model("inference/nullability") + } + testClass { + model("inference/mutability") + } + testClass { + model("copyPaste", pattern = """^([^\.]+)\.java$""") + } + testClass { + model("copyPastePlainText", pattern = """^([^\.]+)\.txt$""") + } + testClass { + model("multiFile", extension = null, recursive = false) + } + } + + testGroup("jps-plugin/jps-tests/test", "jps-plugin/testData") { + testClass { + model("incremental/multiModule/common", extension = null, excludeParentDirs = true) + model("incremental/multiModule/jvm", extension = null, excludeParentDirs = true) + model("incremental/multiModule/multiplatform/custom", extension = null, excludeParentDirs = true) + model("incremental/pureKotlin", extension = null, recursive = false) + model("incremental/withJava", extension = null, excludeParentDirs = true) + model("incremental/inlineFunCallSite", extension = null, excludeParentDirs = true) + model("incremental/classHierarchyAffected", extension = null, excludeParentDirs = true) + } + + actualizeMppJpsIncTestCaseDirs(testDataRoot, "incremental/multiModule/multiplatform/withGeneratedContent") + + testClass { + model("incremental/multiModule/common", extension = null, excludeParentDirs = true) + } + + testClass { + model( + "incremental/multiModule/multiplatform/withGeneratedContent", extension = null, excludeParentDirs = true, + testClassName = "MultiplatformMultiModule", recursive = true + ) + } + + testClass { + model("incremental/lookupTracker/jvm", extension = null, recursive = false) + } + testClass { + model("incremental/lookupTracker/js", extension = null, recursive = false) + } + testClass { + // todo: investigate why lookups are different from non-klib js + model("incremental/lookupTracker/jsKlib", extension = null, recursive = false) + } + + testClass { + model("incremental/lazyKotlinCaches", extension = null, excludeParentDirs = true) + model("incremental/changeIncrementalOption", extension = null, excludeParentDirs = true) + } + + testClass { + model("incremental/cacheVersionChanged", extension = null, excludeParentDirs = true) + } + + testClass { + model("incremental/cacheVersionChanged", extension = null, excludeParentDirs = true) + } + } + + testGroup("jps-plugin/jps-tests/test", "jps-plugin/testData") { + fun TestGroup.TestClass.commonProtoComparisonTests() { + model("comparison/classSignatureChange", extension = null, excludeParentDirs = true) + model("comparison/classPrivateOnlyChange", extension = null, excludeParentDirs = true) + model("comparison/classMembersOnlyChanged", extension = null, excludeParentDirs = true) + model("comparison/packageMembers", extension = null, excludeParentDirs = true) + model("comparison/unchanged", extension = null, excludeParentDirs = true) + } + + testClass { + commonProtoComparisonTests() + model("comparison/jvmOnly", extension = null, excludeParentDirs = true) + } + + testClass { + commonProtoComparisonTests() + model("comparison/jsOnly", extension = null, excludeParentDirs = true) + } + } + + testGroup("compiler/incremental-compilation-impl/test", "jps-plugin/testData") { + fun incrementalJvmTestData(targetBackend: TargetBackend): TestGroup.TestClass.() -> Unit = { + model("incremental/pureKotlin", extension = null, recursive = false, targetBackend = targetBackend) + model("incremental/classHierarchyAffected", extension = null, recursive = false, targetBackend = targetBackend) + model("incremental/inlineFunCallSite", extension = null, excludeParentDirs = true, targetBackend = targetBackend) + model("incremental/withJava", extension = null, excludeParentDirs = true, targetBackend = targetBackend) + model("incremental/incrementalJvmCompilerOnly", extension = null, excludeParentDirs = true, targetBackend = targetBackend) + } + testClass(init = incrementalJvmTestData(TargetBackend.JVM)) + testClass(init = incrementalJvmTestData(TargetBackend.JVM_IR)) + + testClass { + model("incremental/pureKotlin", extension = null, recursive = false) + model("incremental/classHierarchyAffected", extension = null, recursive = false) + model("incremental/js", extension = null, excludeParentDirs = true) + } + + testClass(annotations = listOf(muteExtraSuffix(".jsklib"))) { + model("incremental/pureKotlin", extension = null, recursive = false) + model("incremental/classHierarchyAffected", extension = null, recursive = false) + model("incremental/js", extension = null, excludeParentDirs = true) + } + + testClass { + model("incremental/pureKotlin", extension = null, recursive = false) + model("incremental/classHierarchyAffected", extension = null, recursive = false) + model("incremental/js", extension = null, excludeParentDirs = true) + } + + testClass { + model("incremental/pureKotlin", extension = null, recursive = false) + model("incremental/classHierarchyAffected", extension = null, recursive = false) + model("incremental/js", extension = null, excludeParentDirs = true) + model("incremental/scopeExpansion", extension = null, excludeParentDirs = true) + } + + testClass { + model("incremental/js/friendsModuleDisabled", extension = null, recursive = false) + } + + testClass { + model("incremental/mpp/allPlatforms", extension = null, excludeParentDirs = true) + model("incremental/mpp/jvmOnly", extension = null, excludeParentDirs = true) + } + testClass { + model("incremental/mpp/allPlatforms", extension = null, excludeParentDirs = true) + } + } + + testGroup( + "plugins/android-extensions/android-extensions-compiler/test", + "plugins/android-extensions/android-extensions-compiler/testData" + ) { + testClass { + model("descriptors", recursive = false, extension = null) + } + + testClass { + model("codegen/android", recursive = false, extension = null, testMethod = "doCompileAgainstAndroidSdkTest") + model("codegen/android", recursive = false, extension = null, testMethod = "doFakeInvocationTest", testClassName = "Invoke") + } + + testClass { + model( + "codegen/android", recursive = false, extension = null, testMethod = "doCompileAgainstAndroidSdkTest", + targetBackend = TargetBackend.JVM_IR + ) + model( + "codegen/android", recursive = false, extension = null, testMethod = "doFakeInvocationTest", testClassName = "Invoke", + targetBackend = TargetBackend.JVM_IR + ) + } + + testClass { + model("codegen/bytecodeShape", recursive = false, extension = null) + } + + testClass { + model("parcel/box", targetBackend = TargetBackend.JVM) + } + + testClass { + model("parcel/box", targetBackend = TargetBackend.JVM_IR) + } + + testClass { + model("parcel/codegen", targetBackend = TargetBackend.JVM) + } + + testClass { + model("parcel/codegen", targetBackend = TargetBackend.JVM_IR) + } + } + + testGroup("plugins/jvm-abi-gen/test", "plugins/jvm-abi-gen/testData") { + testClass { + model("compare", recursive = false, extension = null) + } + + testClass { + model("content", recursive = false, extension = null) + } + + testClass { + model("compile", recursive = false, extension = null) + } + } + + testGroup("plugins/kapt3/kapt3-compiler/test", "plugins/kapt3/kapt3-compiler/testData") { + testClass { + model("converter") + } + + testClass { + model("kotlinRunner") + } + + testClass { + model("converter", targetBackend = TargetBackend.JVM_IR) + } + + testClass { + model("kotlinRunner", targetBackend = TargetBackend.JVM_IR) + } + } + + testGroup("plugins/kapt3/kapt3-cli/test", "plugins/kapt3/kapt3-cli/testData") { + testClass { + model("argumentParsing", extension = "txt") + } + + testClass { + model("integration", recursive = false, extension = null) + } + } + + testGroup("plugins/allopen/allopen-cli/test", "plugins/allopen/allopen-cli/testData") { + testClass { + model("bytecodeListing", extension = "kt") + } + } + + testGroup("plugins/noarg/noarg-cli/test", "plugins/noarg/noarg-cli/testData") { + testClass { + model("bytecodeListing", extension = "kt") + } + + testClass { + model("box", targetBackend = TargetBackend.JVM) + } + } + + testGroup("plugins/sam-with-receiver/sam-with-receiver-cli/test", "plugins/sam-with-receiver/sam-with-receiver-cli/testData") { + testClass { + model("diagnostics") + } + testClass { + model("script", extension = "kts") + } + } + + testGroup( + "plugins/kotlin-serialization/kotlin-serialization-compiler/test", + "plugins/kotlin-serialization/kotlin-serialization-compiler/testData" + ) { + testClass { + model("diagnostics") + } + + testClass { + model("codegen") + } + + testClass { + model("codegen") + } + } + + testGroup("plugins/fir/fir-plugin-prototype/tests", "plugins/fir/fir-plugin-prototype/testData") { + testClass { + model("") + } + } + + testGroup("idea/performanceTests/test", "idea/testData") { + testClass { + model("copyPaste/conversion", testMethod = "doPerfTest", pattern = """^([^\.]+)\.java$""") + } + + testClass { + model("copyPaste/conversion", testMethod = "doPerfTest", pattern = """^([^\.]+)\.java$""") + } + + testClass { + model("copyPaste/literal", testMethod = "doPerfTest", pattern = """^([^\.]+)\.kt$""") + } + + testClass { + model("highlighter", testMethod = "doPerfTest") + } + + testClass { + model("addImport", testMethod = "doPerfTest", pattern = KT_WITHOUT_DOTS_IN_NAME) + } + + testClass { + model("indentationOnNewline", testMethod = "doPerfTest", pattern = KT_OR_KTS_WITHOUT_DOTS_IN_NAME) + } + } + + testGroup("idea/performanceTests/test", "idea/idea-completion/testData") { + testClass { + model("incrementalResolve", testMethod = "doPerfTest") + } + + testClass { + model("handlers/basic", testMethod = "doPerfTest", pattern = KT_WITHOUT_DOTS_IN_NAME) + } + + testClass { + model("handlers/smart", testMethod = "doPerfTest") + } + + testClass { + model("handlers/keywords", testMethod = "doPerfTest") + } + + testClass { + model("handlers/charFilter", testMethod = "doPerfTest", pattern = KT_WITHOUT_DOTS_IN_NAME) + } + } + /* + testGroup("plugins/android-extensions/android-extensions-idea/tests", "plugins/android-extensions/android-extensions-idea/testData") { + testClass { + model("android/completion", recursive = false, extension = null) + } + + testClass { + model("android/goto", recursive = false, extension = null) + } + + testClass { + model("android/rename", recursive = false, extension = null) + } + + testClass { + model("android/renameLayout", recursive = false, extension = null) + } + + testClass { + model("android/findUsages", recursive = false, extension = null) + } + + testClass { + model("android/usageHighlighting", recursive = false, extension = null) + } + + testClass { + model("android/extraction", recursive = false, extension = null) + } + + testClass { + model("android/parcel/checker", excludeParentDirs = true) + } + + testClass { + model("android/parcel/quickfix", pattern = """^(\w+)\.((before\.Main\.\w+)|(test))$""", testMethod = "doTestWithExtraFile") + } + } + + testGroup("idea/idea-android/tests", "idea/testData") { + testClass { + model("configuration/android-gradle", pattern = """(\w+)_before\.gradle$""", testMethod = "doTestAndroidGradle") + model("configuration/android-gsk", pattern = """(\w+)_before\.gradle.kts$""", testMethod = "doTestAndroidGradle") + } + + testClass { + model("android/intention", pattern = "^([\\w\\-_]+)\\.kt$") + } + + testClass { + model("android/resourceIntention", extension = "test", singleClass = true) + } + + testClass { + model("android/quickfix", pattern = """^(\w+)\.((before\.Main\.\w+)|(test))$""", testMethod = "doTestWithExtraFile") + } + + testClass { + model("android/lint", excludeParentDirs = true) + } + + testClass { + model("android/lintQuickfix", pattern = "^([\\w\\-_]+)\\.kt$") + } + + testClass { + model("android/folding") + } + + testClass { + model("android/gutterIcon") + } + } + */ } - - //TODO: move these tests into idea-completion module - testGroup("idea/tests", "idea/idea-completion/testData") { - testClass { - model("handlers/runtimeCast") - } - - testClass { - model("basic/codeFragments", extension = "kt") - } - } - - testGroup("j2k/tests", "j2k/testData") { - testClass { - model("fileOrElement", extension = "java") - } - } - testGroup("j2k/tests", "j2k/testData") { - testClass { - model("multiFile", extension = null, recursive = false) - } - } - testGroup("j2k/tests", "j2k/testData") { - testClass { - model("fileOrElement", extension = "java") - } - } - - testGroup("nj2k/tests", "nj2k/testData") { - testClass { - model("newJ2k", pattern = """^([^\.]+)\.java$""") - } - testClass { - model("inference/common") - } - testClass { - model("inference/nullability") - } - testClass { - model("inference/mutability") - } - testClass { - model("copyPaste", pattern = """^([^\.]+)\.java$""") - } - testClass { - model("copyPastePlainText", pattern = """^([^\.]+)\.txt$""") - } - testClass { - model("multiFile", extension = null, recursive = false) - } - } - - testGroup("jps-plugin/jps-tests/test", "jps-plugin/testData") { - testClass { - model("incremental/multiModule/common", extension = null, excludeParentDirs = true) - model("incremental/multiModule/jvm", extension = null, excludeParentDirs = true) - model("incremental/multiModule/multiplatform/custom", extension = null, excludeParentDirs = true) - model("incremental/pureKotlin", extension = null, recursive = false) - model("incremental/withJava", extension = null, excludeParentDirs = true) - model("incremental/inlineFunCallSite", extension = null, excludeParentDirs = true) - model("incremental/classHierarchyAffected", extension = null, excludeParentDirs = true) - } - - actualizeMppJpsIncTestCaseDirs(testDataRoot, "incremental/multiModule/multiplatform/withGeneratedContent") - - testClass { - model("incremental/multiModule/common", extension = null, excludeParentDirs = true) - } - - testClass { - model( - "incremental/multiModule/multiplatform/withGeneratedContent", extension = null, excludeParentDirs = true, - testClassName = "MultiplatformMultiModule", recursive = true - ) - } - - testClass { - model("incremental/lookupTracker/jvm", extension = null, recursive = false) - } - testClass { - model("incremental/lookupTracker/js", extension = null, recursive = false) - } - testClass { - // todo: investigate why lookups are different from non-klib js - model("incremental/lookupTracker/jsKlib", extension = null, recursive = false) - } - - testClass { - model("incremental/lazyKotlinCaches", extension = null, excludeParentDirs = true) - model("incremental/changeIncrementalOption", extension = null, excludeParentDirs = true) - } - - testClass { - model("incremental/cacheVersionChanged", extension = null, excludeParentDirs = true) - } - - testClass { - model("incremental/cacheVersionChanged", extension = null, excludeParentDirs = true) - } - } - - testGroup("jps-plugin/jps-tests/test", "jps-plugin/testData") { - fun TestGroup.TestClass.commonProtoComparisonTests() { - model("comparison/classSignatureChange", extension = null, excludeParentDirs = true) - model("comparison/classPrivateOnlyChange", extension = null, excludeParentDirs = true) - model("comparison/classMembersOnlyChanged", extension = null, excludeParentDirs = true) - model("comparison/packageMembers", extension = null, excludeParentDirs = true) - model("comparison/unchanged", extension = null, excludeParentDirs = true) - } - - testClass { - commonProtoComparisonTests() - model("comparison/jvmOnly", extension = null, excludeParentDirs = true) - } - - testClass { - commonProtoComparisonTests() - model("comparison/jsOnly", extension = null, excludeParentDirs = true) - } - } - - testGroup("compiler/incremental-compilation-impl/test", "jps-plugin/testData") { - fun incrementalJvmTestData(targetBackend: TargetBackend): TestGroup.TestClass.() -> Unit = { - model("incremental/pureKotlin", extension = null, recursive = false, targetBackend = targetBackend) - model("incremental/classHierarchyAffected", extension = null, recursive = false, targetBackend = targetBackend) - model("incremental/inlineFunCallSite", extension = null, excludeParentDirs = true, targetBackend = targetBackend) - model("incremental/withJava", extension = null, excludeParentDirs = true, targetBackend = targetBackend) - model("incremental/incrementalJvmCompilerOnly", extension = null, excludeParentDirs = true, targetBackend = targetBackend) - } - testClass(init = incrementalJvmTestData(TargetBackend.JVM)) - testClass(init = incrementalJvmTestData(TargetBackend.JVM_IR)) - - testClass { - model("incremental/pureKotlin", extension = null, recursive = false) - model("incremental/classHierarchyAffected", extension = null, recursive = false) - model("incremental/js", extension = null, excludeParentDirs = true) - } - - testClass(annotations = listOf(muteExtraSuffix(".jsklib"))) { - model("incremental/pureKotlin", extension = null, recursive = false) - model("incremental/classHierarchyAffected", extension = null, recursive = false) - model("incremental/js", extension = null, excludeParentDirs = true) - } - - testClass { - model("incremental/pureKotlin", extension = null, recursive = false) - model("incremental/classHierarchyAffected", extension = null, recursive = false) - model("incremental/js", extension = null, excludeParentDirs = true) - } - - testClass { - model("incremental/pureKotlin", extension = null, recursive = false) - model("incremental/classHierarchyAffected", extension = null, recursive = false) - model("incremental/js", extension = null, excludeParentDirs = true) - model("incremental/scopeExpansion", extension = null, excludeParentDirs = true) - } - - testClass { - model("incremental/js/friendsModuleDisabled", extension = null, recursive = false) - } - - testClass { - model("incremental/mpp/allPlatforms", extension = null, excludeParentDirs = true) - model("incremental/mpp/jvmOnly", extension = null, excludeParentDirs = true) - } - testClass { - model("incremental/mpp/allPlatforms", extension = null, excludeParentDirs = true) - } - } - - testGroup( - "plugins/android-extensions/android-extensions-compiler/test", - "plugins/android-extensions/android-extensions-compiler/testData" - ) { - testClass { - model("descriptors", recursive = false, extension = null) - } - - testClass { - model("codegen/android", recursive = false, extension = null, testMethod = "doCompileAgainstAndroidSdkTest") - model("codegen/android", recursive = false, extension = null, testMethod = "doFakeInvocationTest", testClassName = "Invoke") - } - - testClass { - model( - "codegen/android", recursive = false, extension = null, testMethod = "doCompileAgainstAndroidSdkTest", - targetBackend = TargetBackend.JVM_IR - ) - model( - "codegen/android", recursive = false, extension = null, testMethod = "doFakeInvocationTest", testClassName = "Invoke", - targetBackend = TargetBackend.JVM_IR - ) - } - - testClass { - model("codegen/bytecodeShape", recursive = false, extension = null) - } - - testClass { - model("parcel/box", targetBackend = TargetBackend.JVM) - } - - testClass { - model("parcel/box", targetBackend = TargetBackend.JVM_IR) - } - - testClass { - model("parcel/codegen", targetBackend = TargetBackend.JVM) - } - - testClass { - model("parcel/codegen", targetBackend = TargetBackend.JVM_IR) - } - } - - testGroup("plugins/jvm-abi-gen/test", "plugins/jvm-abi-gen/testData") { - testClass { - model("compare", recursive = false, extension = null) - } - - testClass { - model("content", recursive = false, extension = null) - } - - testClass { - model("compile", recursive = false, extension = null) - } - } - - testGroup("plugins/kapt3/kapt3-compiler/test", "plugins/kapt3/kapt3-compiler/testData") { - testClass { - model("converter") - } - - testClass { - model("kotlinRunner") - } - - testClass { - model("converter", targetBackend = TargetBackend.JVM_IR) - } - - testClass { - model("kotlinRunner", targetBackend = TargetBackend.JVM_IR) - } - } - - testGroup("plugins/kapt3/kapt3-cli/test", "plugins/kapt3/kapt3-cli/testData") { - testClass { - model("argumentParsing", extension = "txt") - } - - testClass { - model("integration", recursive = false, extension = null) - } - } - - testGroup("plugins/allopen/allopen-cli/test", "plugins/allopen/allopen-cli/testData") { - testClass { - model("bytecodeListing", extension = "kt") - } - } - - testGroup("plugins/noarg/noarg-cli/test", "plugins/noarg/noarg-cli/testData") { - testClass { - model("bytecodeListing", extension = "kt") - } - - testClass { - model("box", targetBackend = TargetBackend.JVM) - } - } - - testGroup("plugins/sam-with-receiver/sam-with-receiver-cli/test", "plugins/sam-with-receiver/sam-with-receiver-cli/testData") { - testClass { - model("diagnostics") - } - testClass { - model("script", extension = "kts") - } - } - - testGroup( - "plugins/kotlin-serialization/kotlin-serialization-compiler/test", - "plugins/kotlin-serialization/kotlin-serialization-compiler/testData" - ) { - testClass { - model("diagnostics") - } - - testClass { - model("codegen") - } - - testClass { - model("codegen") - } - } - - testGroup("plugins/fir/fir-plugin-prototype/tests", "plugins/fir/fir-plugin-prototype/testData") { - testClass { - model("") - } - } - - testGroup("idea/performanceTests/test", "idea/testData") { - testClass { - model("copyPaste/conversion", testMethod = "doPerfTest", pattern = """^([^\.]+)\.java$""") - } - - testClass { - model("copyPaste/conversion", testMethod = "doPerfTest", pattern = """^([^\.]+)\.java$""") - } - - testClass { - model("copyPaste/literal", testMethod = "doPerfTest", pattern = """^([^\.]+)\.kt$""") - } - - testClass { - model("highlighter", testMethod = "doPerfTest") - } - - testClass { - model("addImport", testMethod = "doPerfTest", pattern = KT_WITHOUT_DOTS_IN_NAME) - } - - testClass { - model("indentationOnNewline", testMethod = "doPerfTest", pattern = KT_OR_KTS_WITHOUT_DOTS_IN_NAME) - } - } - - testGroup("idea/performanceTests/test", "idea/idea-completion/testData") { - testClass { - model("incrementalResolve", testMethod = "doPerfTest") - } - - testClass { - model("handlers/basic", testMethod = "doPerfTest", pattern = KT_WITHOUT_DOTS_IN_NAME) - } - - testClass { - model("handlers/smart", testMethod = "doPerfTest") - } - - testClass { - model("handlers/keywords", testMethod = "doPerfTest") - } - - testClass { - model("handlers/charFilter", testMethod = "doPerfTest", pattern = KT_WITHOUT_DOTS_IN_NAME) - } - } -/* - testGroup("plugins/android-extensions/android-extensions-idea/tests", "plugins/android-extensions/android-extensions-idea/testData") { - testClass { - model("android/completion", recursive = false, extension = null) - } - - testClass { - model("android/goto", recursive = false, extension = null) - } - - testClass { - model("android/rename", recursive = false, extension = null) - } - - testClass { - model("android/renameLayout", recursive = false, extension = null) - } - - testClass { - model("android/findUsages", recursive = false, extension = null) - } - - testClass { - model("android/usageHighlighting", recursive = false, extension = null) - } - - testClass { - model("android/extraction", recursive = false, extension = null) - } - - testClass { - model("android/parcel/checker", excludeParentDirs = true) - } - - testClass { - model("android/parcel/quickfix", pattern = """^(\w+)\.((before\.Main\.\w+)|(test))$""", testMethod = "doTestWithExtraFile") - } - } - - testGroup("idea/idea-android/tests", "idea/testData") { - testClass { - model("configuration/android-gradle", pattern = """(\w+)_before\.gradle$""", testMethod = "doTestAndroidGradle") - model("configuration/android-gsk", pattern = """(\w+)_before\.gradle.kts$""", testMethod = "doTestAndroidGradle") - } - - testClass { - model("android/intention", pattern = "^([\\w\\-_]+)\\.kt$") - } - - testClass { - model("android/resourceIntention", extension = "test", singleClass = true) - } - - testClass { - model("android/quickfix", pattern = """^(\w+)\.((before\.Main\.\w+)|(test))$""", testMethod = "doTestWithExtraFile") - } - - testClass { - model("android/lint", excludeParentDirs = true) - } - - testClass { - model("android/lintQuickfix", pattern = "^([\\w\\-_]+)\\.kt$") - } - - testClass { - model("android/folding") - } - - testClass { - model("android/gutterIcon") - } - } -*/ }