diff --git a/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt b/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt index 45d35614b8e..973974a37d2 100644 --- a/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt +++ b/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt @@ -357,7 +357,7 @@ fun main(args: Array) { } testClass(javaClass()) { - model("quickfix", pattern = "^(\\w+)\\.kt$") + model("quickfix", pattern = "^([\\w\\-_]+)\\.kt$") } testClass(javaClass()) { @@ -413,7 +413,7 @@ fun main(args: Array) { } testClass(javaClass()) { - model("intentions") + model("intentions", pattern = "^([\\w\\-_]+)\\.kt$") } testClass(javaClass()) { diff --git a/idea/resources/inspectionDescriptions/DeprecatedCallableAddReplaceWith.html b/idea/resources/inspectionDescriptions/DeprecatedCallableAddReplaceWith.html new file mode 100644 index 00000000000..d8edadf1c9b --- /dev/null +++ b/idea/resources/inspectionDescriptions/DeprecatedCallableAddReplaceWith.html @@ -0,0 +1,6 @@ + + +This inspection reports deprecated functions and properties that do not have kotlin.ReplaceWith argument in its kotlin.deprecated annotation +and there is a suggestion to add one basing on the body. + + diff --git a/idea/resources/intentionDescriptions/DeprecatedCallableAddReplaceWithIntention/after.kt.template b/idea/resources/intentionDescriptions/DeprecatedCallableAddReplaceWithIntention/after.kt.template new file mode 100644 index 00000000000..a8701323b86 --- /dev/null +++ b/idea/resources/intentionDescriptions/DeprecatedCallableAddReplaceWithIntention/after.kt.template @@ -0,0 +1,4 @@ +@deprecated("Use newFun instead", ReplaceWith("newFun(null)")) +fun oldFun(): Int { + return newFun(null) +} \ No newline at end of file diff --git a/idea/resources/intentionDescriptions/DeprecatedCallableAddReplaceWithIntention/before.kt.template b/idea/resources/intentionDescriptions/DeprecatedCallableAddReplaceWithIntention/before.kt.template new file mode 100644 index 00000000000..d5928013986 --- /dev/null +++ b/idea/resources/intentionDescriptions/DeprecatedCallableAddReplaceWithIntention/before.kt.template @@ -0,0 +1,4 @@ +@deprecated("Use newFun instead") +fun oldFun(): Int { + return newFun(null) +} \ No newline at end of file diff --git a/idea/resources/intentionDescriptions/DeprecatedCallableAddReplaceWithIntention/description.html b/idea/resources/intentionDescriptions/DeprecatedCallableAddReplaceWithIntention/description.html new file mode 100644 index 00000000000..ba65779088c --- /dev/null +++ b/idea/resources/intentionDescriptions/DeprecatedCallableAddReplaceWithIntention/description.html @@ -0,0 +1,5 @@ + + +This intention adds kotlin.ReplaceWith argument to kotlin.deprecated annotation on a function or property basing on its body. + + \ No newline at end of file diff --git a/idea/src/META-INF/plugin.xml b/idea/src/META-INF/plugin.xml index 9bcf437c988..a32bd223686 100644 --- a/idea/src/META-INF/plugin.xml +++ b/idea/src/META-INF/plugin.xml @@ -916,6 +916,18 @@ Kotlin + + org.jetbrains.kotlin.idea.intentions.DeprecatedCallableAddReplaceWithIntention + Kotlin + + + + (DeprecatedCallableAddReplaceWithIntention()) + +public class DeprecatedCallableAddReplaceWithIntention : JetSelfTargetingRangeIntention( + javaClass(), "Add 'replaceWith' argument to specify replacement pattern", "Add 'replaceWith' argument to 'deprecated' annotation" +) { + //TODO: use ReplaceWith from package kotlin + private class ReplaceWith(val expression: String, vararg val imports: String) + + override fun applicabilityRange(element: JetCallableDeclaration): TextRange? { + val annotationEntry = element.deprecatedAnnotationWithNoReplaceWith() ?: return null + if (element.suggestReplaceWith() == null) return null + return annotationEntry.getTextRange() + } + + override fun applyTo(element: JetCallableDeclaration, editor: Editor) { + val replaceWith = element.suggestReplaceWith()!! + + assert('\n' !in replaceWith.expression && '\r' !in replaceWith.expression, "Formatted expression text should not contain \\n or \\r") + + val annotationEntry = element.deprecatedAnnotationWithNoReplaceWith()!! + val psiFactory = JetPsiFactory(element) + + val escapedText = replaceWith.expression + .replace("\\", "\\\\") + .replace("\"", "\\\"") + + val argumentText = StringBuilder { + append("kotlin.ReplaceWith(\"") + append(escapedText) + append("\"") + replaceWith.imports.forEach { append(",\"").append(it).append("\"") } + append(")") + }.toString() + + var argument = psiFactory.createArgument(psiFactory.createExpression(argumentText)) + argument = annotationEntry.getValueArgumentList().addArgument(argument) + argument = ShortenReferences.DEFAULT.process(argument) as JetValueArgument + + PsiDocumentManager.getInstance(argument.getProject()).doPostponedOperationsAndUnblockDocument(editor.getDocument()) + editor.moveCaret(argument.getTextOffset()) + } + + private fun JetCallableDeclaration.deprecatedAnnotationWithNoReplaceWith(): JetAnnotationEntry? { + val bindingContext = this.analyze() +// val deprecatedConstructor = KotlinBuiltIns.getInstance().getDeprecatedAnnotation().getUnsubstitutedPrimaryConstructor() + for (entry in getAnnotationEntries()) { + val resolvedCall = entry.getCalleeExpression().getResolvedCall(bindingContext) ?: continue + if (!resolvedCall.getStatus().isSuccess()) continue +// if (resolvedCall.getResultingDescriptor() != deprecatedConstructor) continue + + //TODO + val descriptor = resolvedCall.getResultingDescriptor().getContainingDeclaration() + if (DescriptorUtils.getFqName(descriptor).asString() != "kotlin.deprecated") continue + + val replaceWithArguments = resolvedCall.getValueArguments().entrySet() + .single { it.key.getName().asString() == "replaceWith"/*TODO*/ }.value + return if (replaceWithArguments.getArguments().isEmpty()) entry else null + } + return null + } + + private fun JetCallableDeclaration.suggestReplaceWith(): ReplaceWith? { + val replacementExpression = when (this) { + is JetNamedFunction -> replacementExpressionFromBody() + + is JetProperty -> { + if (isVar()) return null //TODO + getGetter()?.replacementExpressionFromBody() + } + + else -> null + } ?: return null + + var isGood = true + replacementExpression.accept(object: JetVisitorVoid(){ + override fun visitReturnExpression(expression: JetReturnExpression) { + isGood = false + } + + override fun visitDeclaration(dcl: JetDeclaration) { + isGood = false + } + + override fun visitBlockExpression(expression: JetBlockExpression) { + if (expression.getStatements().size() > 1) { + isGood = false + return + } + super.visitBlockExpression(expression) + } + + override fun visitSimpleNameExpression(expression: JetSimpleNameExpression) { + val target = expression.analyze()[BindingContext.REFERENCE_TARGET, expression] as? DeclarationDescriptorWithVisibility ?: return + if (Visibilities.isPrivate((target.getVisibility()))) { + isGood = false + } + } + + override fun visitJetElement(element: JetElement) { + element.acceptChildren(this) + } + }) + if (!isGood) return null + + //TODO: check that no receivers that cannot be referenced from outside involved + + val text = replacementExpression.getText() + var expression = try { + JetPsiFactory(this).createExpression(text.replace('\n', ' ')) + } + catch(e: Exception) { // does not parse in one line + return null + } + expression = CodeStyleManager.getInstance(getProject()).reformat(expression, true) as JetExpression + + return ReplaceWith(expression.getText(), *extractImports(replacementExpression).toTypedArray()) + } + + private fun JetDeclarationWithBody.replacementExpressionFromBody(): JetExpression? { + val body = getBodyExpression() ?: return null + if (!hasBlockBody()) return body + val block = body as? JetBlockExpression ?: return null + val statement = block.getStatements().singleOrNull() as? JetExpression ?: return null + val returnsUnit = (analyze()[BindingContext.DECLARATION_TO_DESCRIPTOR, this] as? FunctionDescriptor)?.getReturnType()?.isUnit() ?: true + return when (statement) { + is JetReturnExpression -> statement.getReturnedExpression() + else -> if (returnsUnit) statement else null + } + } + + private fun extractImports(expression: JetExpression): Collection { + val file = expression.getContainingJetFile() + val currentPackageFqName = file.getPackageFqName() + val importHelper = ImportInsertHelper.getInstance(expression.getProject()) + + val result = ArrayList() + expression.accept(object : JetVisitorVoid(){ + override fun visitSimpleNameExpression(expression: JetSimpleNameExpression) { + val bindingContext = expression.analyze() + val target = bindingContext[BindingContext.SHORT_REFERENCE_TO_COMPANION_OBJECT, expression] + ?: bindingContext[BindingContext.REFERENCE_TARGET, expression] + ?: return + if (!target.canBeReferencedViaImport()) return + if (target.isExtension || expression.getReceiverExpression() == null) { + val fqName = target.importableFqName ?: return + if (!importHelper.isImportedWithDefault(ImportPath(fqName, false), file) + && (target.getContainingDeclaration() as? PackageFragmentDescriptor)?.fqName != currentPackageFqName) { + result.add(fqName.asString()) + } + } + } + + override fun visitJetElement(element: JetElement) { + element.acceptChildren(this) + } + }) + return result + } +} \ No newline at end of file diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/.intention b/idea/testData/intentions/deprecatedCallableAddReplaceWith/.intention new file mode 100644 index 00000000000..d665c029dd4 --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/.intention @@ -0,0 +1 @@ +org.jetbrains.kotlin.idea.intentions.DeprecatedCallableAddReplaceWithIntention diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/AlreadyWithReplaceWith.kt b/idea/testData/intentions/deprecatedCallableAddReplaceWith/AlreadyWithReplaceWith.kt new file mode 100644 index 00000000000..8ba06f98b91 --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/AlreadyWithReplaceWith.kt @@ -0,0 +1,7 @@ +// IS_APPLICABLE: false +@deprecated("", ReplaceWith("bar()")) +fun foo() { + bar() +} + +fun bar(){} \ No newline at end of file diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/CommentInBody.kt b/idea/testData/intentions/deprecatedCallableAddReplaceWith/CommentInBody.kt new file mode 100644 index 00000000000..63a9bb09544 --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/CommentInBody.kt @@ -0,0 +1,7 @@ +@deprecated("") +fun foo() { + // invoke bar() + bar() +} + +fun bar(){} \ No newline at end of file diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/CommentInBody.kt.after b/idea/testData/intentions/deprecatedCallableAddReplaceWith/CommentInBody.kt.after new file mode 100644 index 00000000000..6d15b78d3ee --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/CommentInBody.kt.after @@ -0,0 +1,7 @@ +@deprecated("", ReplaceWith("bar()")) +fun foo() { + // invoke bar() + bar() +} + +fun bar(){} \ No newline at end of file diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/DeclarationInside.kt b/idea/testData/intentions/deprecatedCallableAddReplaceWith/DeclarationInside.kt new file mode 100644 index 00000000000..372deb2eebc --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/DeclarationInside.kt @@ -0,0 +1,10 @@ +// IS_APPLICABLE: false +@deprecated("") +fun foo(p: Int) { + if (p > 0) { + val v = p + 1 + bar(v) + } +} + +fun bar(p: Int){} diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/ExpressionBody.kt b/idea/testData/intentions/deprecatedCallableAddReplaceWith/ExpressionBody.kt new file mode 100644 index 00000000000..53acf42df7b --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/ExpressionBody.kt @@ -0,0 +1,4 @@ +@deprecated("") +fun foo(): String = bar() + +fun bar(): String = "" diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/ExpressionBody.kt.after b/idea/testData/intentions/deprecatedCallableAddReplaceWith/ExpressionBody.kt.after new file mode 100644 index 00000000000..fefeff6e713 --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/ExpressionBody.kt.after @@ -0,0 +1,4 @@ +@deprecated("", ReplaceWith("bar()")) +fun foo(): String = bar() + +fun bar(): String = "" diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/If.kt b/idea/testData/intentions/deprecatedCallableAddReplaceWith/If.kt new file mode 100644 index 00000000000..6c287f9484a --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/If.kt @@ -0,0 +1,10 @@ +@deprecated("") +fun foo(p: Int) { + if (p > 0) + bar1(p) + else + bar2(p) +} + +fun bar1(p: Int){} +fun bar2(p: Int){} \ No newline at end of file diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/If.kt.after b/idea/testData/intentions/deprecatedCallableAddReplaceWith/If.kt.after new file mode 100644 index 00000000000..3916d89f1d8 --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/If.kt.after @@ -0,0 +1,10 @@ +@deprecated("", ReplaceWith("if (p > 0) bar1(p) else bar2(p)")) +fun foo(p: Int) { + if (p > 0) + bar1(p) + else + bar2(p) +} + +fun bar1(p: Int){} +fun bar2(p: Int){} \ No newline at end of file diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/Imports.1.kt b/idea/testData/intentions/deprecatedCallableAddReplaceWith/Imports.1.kt new file mode 100644 index 00000000000..d64e6d878a8 --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/Imports.1.kt @@ -0,0 +1,3 @@ +package dependency + +val valueFromOtherPackage = 1 \ No newline at end of file diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/Imports.1.kt.after b/idea/testData/intentions/deprecatedCallableAddReplaceWith/Imports.1.kt.after new file mode 100644 index 00000000000..d64e6d878a8 --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/Imports.1.kt.after @@ -0,0 +1,3 @@ +package dependency + +val valueFromOtherPackage = 1 \ No newline at end of file diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/Imports.kt b/idea/testData/intentions/deprecatedCallableAddReplaceWith/Imports.kt new file mode 100644 index 00000000000..88f6e430271 --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/Imports.kt @@ -0,0 +1,10 @@ +package pack + +import dependency.valueFromOtherPackage + +@deprecated("") +fun foo() { + bar(valueFromOtherPackage) +} + +fun bar(p: Int){} \ No newline at end of file diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/Imports.kt.after b/idea/testData/intentions/deprecatedCallableAddReplaceWith/Imports.kt.after new file mode 100644 index 00000000000..e75cbb27d2f --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/Imports.kt.after @@ -0,0 +1,10 @@ +package pack + +import dependency.valueFromOtherPackage + +@deprecated("", ReplaceWith("bar(valueFromOtherPackage)", "dependency.valueFromOtherPackage")) +fun foo() { + bar(valueFromOtherPackage) +} + +fun bar(p: Int){} \ No newline at end of file diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.1.kt b/idea/testData/intentions/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.1.kt new file mode 100644 index 00000000000..cc28ebe1079 --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.1.kt @@ -0,0 +1,7 @@ +package dependency + +class D { + companion object { + val value = 1 + } +} diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.1.kt.after b/idea/testData/intentions/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.1.kt.after new file mode 100644 index 00000000000..cc28ebe1079 --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.1.kt.after @@ -0,0 +1,7 @@ +package dependency + +class D { + companion object { + val value = 1 + } +} diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.kt b/idea/testData/intentions/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.kt new file mode 100644 index 00000000000..9471c80a3aa --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.kt @@ -0,0 +1,10 @@ +package pack + +import dependency.D + +@deprecated("") +fun foo() { + bar(D.value) +} + +fun bar(p: Int){} \ No newline at end of file diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.kt.after b/idea/testData/intentions/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.kt.after new file mode 100644 index 00000000000..fcb8a95665a --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.kt.after @@ -0,0 +1,10 @@ +package pack + +import dependency.D + +@deprecated("", ReplaceWith("bar(D.value)", "dependency.D")) +fun foo() { + bar(D.value) +} + +fun bar(p: Int){} \ No newline at end of file diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/NoDefaultImport.kt b/idea/testData/intentions/deprecatedCallableAddReplaceWith/NoDefaultImport.kt new file mode 100644 index 00000000000..213098e9abc --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/NoDefaultImport.kt @@ -0,0 +1,5 @@ +// WITH_RUNTIME +@deprecated("") +fun foo(s: String): String { + return s.substring(1) + Int.MAX_VALUE +} diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/NoDefaultImport.kt.after b/idea/testData/intentions/deprecatedCallableAddReplaceWith/NoDefaultImport.kt.after new file mode 100644 index 00000000000..2c786967f8a --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/NoDefaultImport.kt.after @@ -0,0 +1,5 @@ +// WITH_RUNTIME +@deprecated("", ReplaceWith("s.substring(1) + Int.MAX_VALUE")) +fun foo(s: String): String { + return s.substring(1) + Int.MAX_VALUE +} diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/NoReturn.kt b/idea/testData/intentions/deprecatedCallableAddReplaceWith/NoReturn.kt new file mode 100644 index 00000000000..a623ed4f8c2 --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/NoReturn.kt @@ -0,0 +1,9 @@ +// IS_APPLICABLE: false +// ERROR: A 'return' expression required in a function with a block body ('{...}') + +@deprecated("") +fun foo(): String { + bar() +} + +fun bar(): String = "" \ No newline at end of file diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/PrivateSymbolUsed.kt b/idea/testData/intentions/deprecatedCallableAddReplaceWith/PrivateSymbolUsed.kt new file mode 100644 index 00000000000..77c4e7340e0 --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/PrivateSymbolUsed.kt @@ -0,0 +1,11 @@ +// IS_APPLICABLE: false +class C { + private val v = 1 + + @deprecated("") + fun foo() { + bar(v) + } + + fun bar(p: Int){} +} diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/QualifiedCall.kt b/idea/testData/intentions/deprecatedCallableAddReplaceWith/QualifiedCall.kt new file mode 100644 index 00000000000..cb64550cfa6 --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/QualifiedCall.kt @@ -0,0 +1,6 @@ +@deprecated("") +fun foo(s: String) { + s.bar() +} + +fun String.bar(){} \ No newline at end of file diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/QualifiedCall.kt.after b/idea/testData/intentions/deprecatedCallableAddReplaceWith/QualifiedCall.kt.after new file mode 100644 index 00000000000..d56365f9303 --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/QualifiedCall.kt.after @@ -0,0 +1,6 @@ +@deprecated("", ReplaceWith("s.bar()")) +fun foo(s: String) { + s.bar() +} + +fun String.bar(){} \ No newline at end of file diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/Return.kt b/idea/testData/intentions/deprecatedCallableAddReplaceWith/Return.kt new file mode 100644 index 00000000000..5b77a6330c6 --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/Return.kt @@ -0,0 +1,6 @@ +@deprecated("") +fun foo(): String { + return bar() +} + +fun bar(): String = "" \ No newline at end of file diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/Return.kt.after b/idea/testData/intentions/deprecatedCallableAddReplaceWith/Return.kt.after new file mode 100644 index 00000000000..5e890842de5 --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/Return.kt.after @@ -0,0 +1,6 @@ +@deprecated("", ReplaceWith("bar()")) +fun foo(): String { + return bar() +} + +fun bar(): String = "" \ No newline at end of file diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/ReturnInside.kt b/idea/testData/intentions/deprecatedCallableAddReplaceWith/ReturnInside.kt new file mode 100644 index 00000000000..3e6ec8cc575 --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/ReturnInside.kt @@ -0,0 +1,7 @@ +// IS_APPLICABLE: false +@deprecated("") +fun foo() { + bar() ?: return +} + +fun bar(): String? = null \ No newline at end of file diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/Simple.kt b/idea/testData/intentions/deprecatedCallableAddReplaceWith/Simple.kt new file mode 100644 index 00000000000..683e1161da7 --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/Simple.kt @@ -0,0 +1,6 @@ +@deprecated("") +fun foo() { + bar() +} + +fun bar(){} \ No newline at end of file diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/Simple.kt.after b/idea/testData/intentions/deprecatedCallableAddReplaceWith/Simple.kt.after new file mode 100644 index 00000000000..6f3c9bda2d1 --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/Simple.kt.after @@ -0,0 +1,6 @@ +@deprecated("", ReplaceWith("bar()")) +fun foo() { + bar() +} + +fun bar(){} \ No newline at end of file diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/StringLiteral.kt b/idea/testData/intentions/deprecatedCallableAddReplaceWith/StringLiteral.kt new file mode 100644 index 00000000000..d40b396d2f5 --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/StringLiteral.kt @@ -0,0 +1,6 @@ +@deprecated("") +fun foo(p: Int) { + bar("\"$p\"\n1\r2\t3") +} + +fun bar(s: String){} \ No newline at end of file diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/StringLiteral.kt.after b/idea/testData/intentions/deprecatedCallableAddReplaceWith/StringLiteral.kt.after new file mode 100644 index 00000000000..75e2ff5c9b1 --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/StringLiteral.kt.after @@ -0,0 +1,6 @@ +@deprecated("", ReplaceWith("bar(\"\\\"$p\\\"\\n1\\r2\\t3\")")) +fun foo(p: Int) { + bar("\"$p\"\n1\r2\t3") +} + +fun bar(s: String){} \ No newline at end of file diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/TwoStatements.kt b/idea/testData/intentions/deprecatedCallableAddReplaceWith/TwoStatements.kt new file mode 100644 index 00000000000..9195339dd5d --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/TwoStatements.kt @@ -0,0 +1,8 @@ +// IS_APPLICABLE: false +@deprecated("") +fun foo() { + bar() + bar() +} + +fun bar(){} \ No newline at end of file diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/ValProperty.kt b/idea/testData/intentions/deprecatedCallableAddReplaceWith/ValProperty.kt new file mode 100644 index 00000000000..44d077b3e80 --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/ValProperty.kt @@ -0,0 +1,7 @@ +class C { + @deprecated("") + val foo: String + get() = bar() + + fun bar(): String = "" +} diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/ValProperty.kt.after b/idea/testData/intentions/deprecatedCallableAddReplaceWith/ValProperty.kt.after new file mode 100644 index 00000000000..80c0d02ad5b --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/ValProperty.kt.after @@ -0,0 +1,7 @@ +class C { + @deprecated("", ReplaceWith("bar()")) + val foo: String + get() = bar() + + fun bar(): String = "" +} diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/ValPropertyWithReturn.kt b/idea/testData/intentions/deprecatedCallableAddReplaceWith/ValPropertyWithReturn.kt new file mode 100644 index 00000000000..ae64e2c7fdd --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/ValPropertyWithReturn.kt @@ -0,0 +1,9 @@ +class C { + @deprecated("") + val foo: String + get() { + return bar() + } + + fun bar(): String = "" +} diff --git a/idea/testData/intentions/deprecatedCallableAddReplaceWith/ValPropertyWithReturn.kt.after b/idea/testData/intentions/deprecatedCallableAddReplaceWith/ValPropertyWithReturn.kt.after new file mode 100644 index 00000000000..72e5ef03cf0 --- /dev/null +++ b/idea/testData/intentions/deprecatedCallableAddReplaceWith/ValPropertyWithReturn.kt.after @@ -0,0 +1,9 @@ +class C { + @deprecated("", ReplaceWith("bar()")) + val foo: String + get() { + return bar() + } + + fun bar(): String = "" +} diff --git a/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java index 1ff4fb30dba..900ba3ba3c9 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java @@ -32,7 +32,7 @@ import java.util.regex.Pattern; @RunWith(JUnit3RunnerWithInners.class) public class IntentionTestGenerated extends AbstractIntentionTest { public void testAllFilesPresentInIntentions() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("idea/testData/intentions/addBraces") @@ -88,7 +88,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { } public void testAllFilesPresentInAddBraces() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/addBraces"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/addBraces"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } } @@ -97,7 +97,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class Branched extends AbstractIntentionTest { public void testAllFilesPresentInBranched() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("idea/testData/intentions/branched/doubleBangToIfThen") @@ -105,7 +105,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class DoubleBangToIfThen extends AbstractIntentionTest { public void testAllFilesPresentInDoubleBangToIfThen() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/doubleBangToIfThen"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/doubleBangToIfThen"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("callExpression.kt") @@ -186,7 +186,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class ElvisToIfThen extends AbstractIntentionTest { public void testAllFilesPresentInElvisToIfThen() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/elvisToIfThen"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/elvisToIfThen"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("callExpression.kt") @@ -261,7 +261,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class Folding extends AbstractIntentionTest { public void testAllFilesPresentInFolding() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/folding"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/folding"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("idea/testData/intentions/branched/folding/ifToAssignment") @@ -269,7 +269,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class IfToAssignment extends AbstractIntentionTest { public void testAllFilesPresentInIfToAssignment() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/folding/ifToAssignment"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/folding/ifToAssignment"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("innerIfTransformed.kt") @@ -332,7 +332,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class IfToReturn extends AbstractIntentionTest { public void testAllFilesPresentInIfToReturn() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/folding/ifToReturn"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/folding/ifToReturn"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("innerIfTransformed.kt") @@ -359,7 +359,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class IfToReturnAsymmetrically extends AbstractIntentionTest { public void testAllFilesPresentInIfToReturnAsymmetrically() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/folding/ifToReturnAsymmetrically"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/folding/ifToReturnAsymmetrically"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("simpleIf.kt") @@ -386,7 +386,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class WhenToAssignment extends AbstractIntentionTest { public void testAllFilesPresentInWhenToAssignment() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/folding/whenToAssignment"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/folding/whenToAssignment"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("innerWhenTransformed.kt") @@ -431,7 +431,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class WhenToReturn extends AbstractIntentionTest { public void testAllFilesPresentInWhenToReturn() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/folding/whenToReturn"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/folding/whenToReturn"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("innerWhenTransformed.kt") @@ -483,7 +483,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { } public void testAllFilesPresentInIfThenToDoubleBang() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/ifThenToDoubleBang"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/ifThenToDoubleBang"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("blockHasMoreThanOneStatement.kt") @@ -672,7 +672,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class IfThenToElvis extends AbstractIntentionTest { public void testAllFilesPresentInIfThenToElvis() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/ifThenToElvis"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/ifThenToElvis"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("blockHasMoreThanOneStatement.kt") @@ -874,7 +874,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class IfThenToSafeAccess extends AbstractIntentionTest { public void testAllFilesPresentInIfThenToSafeAccess() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/ifThenToSafeAccess"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/ifThenToSafeAccess"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("blockHasMoreThanOneStatement.kt") @@ -1088,7 +1088,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class IfWhen extends AbstractIntentionTest { public void testAllFilesPresentInIfWhen() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/ifWhen"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/ifWhen"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("idea/testData/intentions/branched/ifWhen/ifToWhen") @@ -1096,7 +1096,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class IfToWhen extends AbstractIntentionTest { public void testAllFilesPresentInIfToWhen() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/ifWhen/ifToWhen"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/ifWhen/ifToWhen"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("ifWithEqualityTests.kt") @@ -1165,7 +1165,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class WhenToIf extends AbstractIntentionTest { public void testAllFilesPresentInWhenToIf() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/ifWhen/whenToIf"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/ifWhen/whenToIf"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("whenWithDotQualifiedExpression.kt") @@ -1253,7 +1253,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class SafeAccessToIfThen extends AbstractIntentionTest { public void testAllFilesPresentInSafeAccessToIfThen() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/safeAccessToIfThen"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/safeAccessToIfThen"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("binaryExpressionLhs.kt") @@ -1394,7 +1394,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class Unfolding extends AbstractIntentionTest { public void testAllFilesPresentInUnfolding() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/unfolding"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/unfolding"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("idea/testData/intentions/branched/unfolding/assignmentToIf") @@ -1402,7 +1402,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class AssignmentToIf extends AbstractIntentionTest { public void testAllFilesPresentInAssignmentToIf() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/unfolding/assignmentToIf"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/unfolding/assignmentToIf"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("innerIfTransformed.kt") @@ -1453,7 +1453,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class AssignmentToWhen extends AbstractIntentionTest { public void testAllFilesPresentInAssignmentToWhen() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/unfolding/assignmentToWhen"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/unfolding/assignmentToWhen"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("innerWhenTransformed.kt") @@ -1486,7 +1486,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class PropertyToIf extends AbstractIntentionTest { public void testAllFilesPresentInPropertyToIf() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/unfolding/propertyToIf"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/unfolding/propertyToIf"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("nestedIfs.kt") @@ -1549,7 +1549,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class PropertyToWhen extends AbstractIntentionTest { public void testAllFilesPresentInPropertyToWhen() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/unfolding/propertyToWhen"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/unfolding/propertyToWhen"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("nonLocalProperty.kt") @@ -1600,7 +1600,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class ReturnToIf extends AbstractIntentionTest { public void testAllFilesPresentInReturnToIf() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/unfolding/returnToIf"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/unfolding/returnToIf"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("innerIfTransformed.kt") @@ -1627,7 +1627,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class ReturnToWhen extends AbstractIntentionTest { public void testAllFilesPresentInReturnToWhen() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/unfolding/returnToWhen"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/unfolding/returnToWhen"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("innerWhenTransformed.kt") @@ -1655,7 +1655,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class When extends AbstractIntentionTest { public void testAllFilesPresentInWhen() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/when"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/when"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("idea/testData/intentions/branched/when/eliminateSubject") @@ -1663,7 +1663,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class EliminateSubject extends AbstractIntentionTest { public void testAllFilesPresentInEliminateSubject() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/when/eliminateSubject"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/when/eliminateSubject"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("whenWithEqualityTests.kt") @@ -1720,7 +1720,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class Flatten extends AbstractIntentionTest { public void testAllFilesPresentInFlatten() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/when/flatten"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/when/flatten"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("flattenWithSubject.kt") @@ -1747,7 +1747,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class IntroduceSubject extends AbstractIntentionTest { public void testAllFilesPresentInIntroduceSubject() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/when/introduceSubject"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/when/introduceSubject"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("whenWithEqualityTests.kt") @@ -1822,7 +1822,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class Merge extends AbstractIntentionTest { public void testAllFilesPresentInMerge() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/when/merge"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/when/merge"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("mergeBlockWithBlock.kt") @@ -1941,7 +1941,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class ChangeVisibility extends AbstractIntentionTest { public void testAllFilesPresentInChangeVisibility() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/changeVisibility"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/changeVisibility"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("idea/testData/intentions/changeVisibility/internal") @@ -1949,7 +1949,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class Internal extends AbstractIntentionTest { public void testAllFilesPresentInInternal() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/changeVisibility/internal"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/changeVisibility/internal"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("internalByDefault.kt") @@ -1970,7 +1970,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class Private extends AbstractIntentionTest { public void testAllFilesPresentInPrivate() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/changeVisibility/private"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/changeVisibility/private"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("noModifierListClass.kt") @@ -2057,7 +2057,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class Protected extends AbstractIntentionTest { public void testAllFilesPresentInProtected() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/changeVisibility/protected"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/changeVisibility/protected"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("noModifier.kt") @@ -2090,7 +2090,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class Public extends AbstractIntentionTest { public void testAllFilesPresentInPublic() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/changeVisibility/public"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/changeVisibility/public"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("alreadyPublic.kt") @@ -2136,7 +2136,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class ConventionNameCalls extends AbstractIntentionTest { public void testAllFilesPresentInConventionNameCalls() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/conventionNameCalls"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/conventionNameCalls"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("idea/testData/intentions/conventionNameCalls/replaceCallWithBinaryOperator") @@ -2156,7 +2156,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { } public void testAllFilesPresentInReplaceCallWithBinaryOperator() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/conventionNameCalls/replaceCallWithBinaryOperator"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/conventionNameCalls/replaceCallWithBinaryOperator"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("allowableDefaultArgument.kt") @@ -2261,7 +2261,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { } public void testAllFilesPresentInReplaceCallWithUnaryOperator() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("complexPlus.kt") @@ -2354,7 +2354,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { } public void testAllFilesPresentInReplaceContains() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/conventionNameCalls/replaceContains"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/conventionNameCalls/replaceContains"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("allowableDefaultArgument.kt") @@ -2471,7 +2471,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { } public void testAllFilesPresentInReplaceGet() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/conventionNameCalls/replaceGet"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/conventionNameCalls/replaceGet"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("argumentAndFunction.kt") @@ -2553,7 +2553,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceInvoke extends AbstractIntentionTest { public void testAllFilesPresentInReplaceInvoke() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/conventionNameCalls/replaceInvoke"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/conventionNameCalls/replaceInvoke"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("expressionReceiver.kt") @@ -2629,7 +2629,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class ConvertAssertToIf extends AbstractIntentionTest { public void testAllFilesPresentInConvertAssertToIf() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertAssertToIf"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertAssertToIf"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("assertErrorOverloaded.kt") @@ -2752,7 +2752,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class ConvertForEachToForLoop extends AbstractIntentionTest { public void testAllFilesPresentInConvertForEachToForLoop() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertForEachToForLoop"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertForEachToForLoop"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("complexReceiver.kt") @@ -2845,7 +2845,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { } public void testAllFilesPresentInConvertFunctionToProperty() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertFunctionToProperty"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertFunctionToProperty"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("blockBody.kt") @@ -2962,7 +2962,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class ConvertIfWithThrowToAssert extends AbstractIntentionTest { public void testAllFilesPresentInConvertIfWithThrowToAssert() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertIfWithThrowToAssert"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertIfWithThrowToAssert"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("assertOverloaded.kt") @@ -3049,7 +3049,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class ConvertNegatedBooleanSequence extends AbstractIntentionTest { public void testAllFilesPresentInConvertNegatedBooleanSequence() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertNegatedBooleanSequence"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertNegatedBooleanSequence"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("complexNegatedSequence.kt") @@ -3118,7 +3118,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class ConvertNegatedExpressionWithDemorgansLaw extends AbstractIntentionTest { public void testAllFilesPresentInConvertNegatedExpressionWithDemorgansLaw() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertNegatedExpressionWithDemorgansLaw"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertNegatedExpressionWithDemorgansLaw"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("complexNegation1.kt") @@ -3211,7 +3211,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class ConvertParameterToReceiver extends AbstractIntentionTest { public void testAllFilesPresentInConvertParameterToReceiver() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertParameterToReceiver"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertParameterToReceiver"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("classParameter.kt") @@ -3286,7 +3286,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { } public void testAllFilesPresentInConvertPropertyToFunction() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertPropertyToFunction"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertPropertyToFunction"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("blockBody.kt") @@ -3379,7 +3379,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class ConvertReceiverToParameter extends AbstractIntentionTest { public void testAllFilesPresentInConvertReceiverToParameter() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertReceiverToParameter"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertReceiverToParameter"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("localFun.kt") @@ -3418,7 +3418,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class ConvertToBlockBody extends AbstractIntentionTest { public void testAllFilesPresentInConvertToBlockBody() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertToBlockBody"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertToBlockBody"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("explicitlyNonUnitFun.kt") @@ -3505,7 +3505,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class ConvertToConcatenatedString extends AbstractIntentionTest { public void testAllFilesPresentInConvertToConcatenatedString() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertToConcatenatedString"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertToConcatenatedString"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("embeddedIf.kt") @@ -3664,7 +3664,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class ConvertToExpressionBody extends AbstractIntentionTest { public void testAllFilesPresentInConvertToExpressionBody() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertToExpressionBody"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertToExpressionBody"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("anonymousObjectExpression.kt") @@ -3793,7 +3793,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class ConvertToForEachFunctionCall extends AbstractIntentionTest { public void testAllFilesPresentInConvertToForEachFunctionCall() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertToForEachFunctionCall"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertToForEachFunctionCall"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("binaryExpressionLoopRange.kt") @@ -3844,7 +3844,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class ConvertToStringTemplate extends AbstractIntentionTest { public void testAllFilesPresentInConvertToStringTemplate() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertToStringTemplate"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertToStringTemplate"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("backslashNMultilineString.kt") @@ -4015,7 +4015,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class Declarations extends AbstractIntentionTest { public void testAllFilesPresentInDeclarations() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/declarations"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/declarations"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("idea/testData/intentions/declarations/convertMemberToExtension") @@ -4035,7 +4035,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { } public void testAllFilesPresentInConvertMemberToExtension() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/declarations/convertMemberToExtension"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/declarations/convertMemberToExtension"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("explicitUnit.kt") @@ -4260,7 +4260,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class Split extends AbstractIntentionTest { public void testAllFilesPresentInSplit() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/declarations/split"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/declarations/split"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("longInit.kt") @@ -4337,12 +4337,129 @@ public class IntentionTestGenerated extends AbstractIntentionTest { } } + @TestMetadata("idea/testData/intentions/deprecatedCallableAddReplaceWith") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DeprecatedCallableAddReplaceWith extends AbstractIntentionTest { + public void testAllFilesPresentInDeprecatedCallableAddReplaceWith() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/deprecatedCallableAddReplaceWith"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); + } + + @TestMetadata("AlreadyWithReplaceWith.kt") + public void testAlreadyWithReplaceWith() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/deprecatedCallableAddReplaceWith/AlreadyWithReplaceWith.kt"); + doTest(fileName); + } + + @TestMetadata("CommentInBody.kt") + public void testCommentInBody() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/deprecatedCallableAddReplaceWith/CommentInBody.kt"); + doTest(fileName); + } + + @TestMetadata("DeclarationInside.kt") + public void testDeclarationInside() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/deprecatedCallableAddReplaceWith/DeclarationInside.kt"); + doTest(fileName); + } + + @TestMetadata("ExpressionBody.kt") + public void testExpressionBody() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/deprecatedCallableAddReplaceWith/ExpressionBody.kt"); + doTest(fileName); + } + + @TestMetadata("If.kt") + public void testIf() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/deprecatedCallableAddReplaceWith/If.kt"); + doTest(fileName); + } + + @TestMetadata("Imports.kt") + public void testImports() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/deprecatedCallableAddReplaceWith/Imports.kt"); + doTest(fileName); + } + + @TestMetadata("NoCompanionObjectImport.kt") + public void testNoCompanionObjectImport() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.kt"); + doTest(fileName); + } + + @TestMetadata("NoDefaultImport.kt") + public void testNoDefaultImport() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/deprecatedCallableAddReplaceWith/NoDefaultImport.kt"); + doTest(fileName); + } + + @TestMetadata("NoReturn.kt") + public void testNoReturn() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/deprecatedCallableAddReplaceWith/NoReturn.kt"); + doTest(fileName); + } + + @TestMetadata("PrivateSymbolUsed.kt") + public void testPrivateSymbolUsed() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/deprecatedCallableAddReplaceWith/PrivateSymbolUsed.kt"); + doTest(fileName); + } + + @TestMetadata("QualifiedCall.kt") + public void testQualifiedCall() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/deprecatedCallableAddReplaceWith/QualifiedCall.kt"); + doTest(fileName); + } + + @TestMetadata("Return.kt") + public void testReturn() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/deprecatedCallableAddReplaceWith/Return.kt"); + doTest(fileName); + } + + @TestMetadata("ReturnInside.kt") + public void testReturnInside() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/deprecatedCallableAddReplaceWith/ReturnInside.kt"); + doTest(fileName); + } + + @TestMetadata("Simple.kt") + public void testSimple() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/deprecatedCallableAddReplaceWith/Simple.kt"); + doTest(fileName); + } + + @TestMetadata("StringLiteral.kt") + public void testStringLiteral() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/deprecatedCallableAddReplaceWith/StringLiteral.kt"); + doTest(fileName); + } + + @TestMetadata("TwoStatements.kt") + public void testTwoStatements() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/deprecatedCallableAddReplaceWith/TwoStatements.kt"); + doTest(fileName); + } + + @TestMetadata("ValProperty.kt") + public void testValProperty() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/deprecatedCallableAddReplaceWith/ValProperty.kt"); + doTest(fileName); + } + + @TestMetadata("ValPropertyWithReturn.kt") + public void testValPropertyWithReturn() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/deprecatedCallableAddReplaceWith/ValPropertyWithReturn.kt"); + doTest(fileName); + } + } + @TestMetadata("idea/testData/intentions/ifNullToElvis") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IfNullToElvis extends AbstractIntentionTest { public void testAllFilesPresentInIfNullToElvis() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/ifNullToElvis"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/ifNullToElvis"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("Break.kt") @@ -4429,7 +4546,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class InfixCallToOrdinary extends AbstractIntentionTest { public void testAllFilesPresentInInfixCallToOrdinary() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/infixCallToOrdinary"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/infixCallToOrdinary"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("functionCallAfterInfixCall.kt") @@ -4474,7 +4591,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class InsertCurlyBracesToTemplate extends AbstractIntentionTest { public void testAllFilesPresentInInsertCurlyBracesToTemplate() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/insertCurlyBracesToTemplate"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/insertCurlyBracesToTemplate"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("dontInsertBrackets1.kt") @@ -4519,7 +4636,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class InsertExplicitTypeArguments extends AbstractIntentionTest { public void testAllFilesPresentInInsertExplicitTypeArguments() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/insertExplicitTypeArguments"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/insertExplicitTypeArguments"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("inapplicableAlreadyTyped.kt") @@ -4642,7 +4759,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class InvertIfCondition extends AbstractIntentionTest { public void testAllFilesPresentInInvertIfCondition() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/invertIfCondition"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/invertIfCondition"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("assignedToValue.kt") @@ -4813,7 +4930,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class MoveLambdaInsideParentheses extends AbstractIntentionTest { public void testAllFilesPresentInMoveLambdaInsideParentheses() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/moveLambdaInsideParentheses"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/moveLambdaInsideParentheses"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("inapplicable1.kt") @@ -4918,7 +5035,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class MoveLambdaOutsideParentheses extends AbstractIntentionTest { public void testAllFilesPresentInMoveLambdaOutsideParentheses() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/moveLambdaOutsideParentheses"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/moveLambdaOutsideParentheses"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("ambigousOverload.kt") @@ -5029,7 +5146,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class OperatorToFunction extends AbstractIntentionTest { public void testAllFilesPresentInOperatorToFunction() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/operatorToFunction"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/operatorToFunction"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("arrayAccessMultipleIndex.kt") @@ -5158,7 +5275,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class ReconstructTypeInCastOrIs extends AbstractIntentionTest { public void testAllFilesPresentInReconstructTypeInCastOrIs() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/reconstructTypeInCastOrIs"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/reconstructTypeInCastOrIs"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("completeGenericType.kt") @@ -5197,7 +5314,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class RemoveBraces extends AbstractIntentionTest { public void testAllFilesPresentInRemoveBraces() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeBraces"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeBraces"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("doWhile.kt") @@ -5278,7 +5395,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class RemoveCurlyBracesFromTemplate extends AbstractIntentionTest { public void testAllFilesPresentInRemoveCurlyBracesFromTemplate() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeCurlyBracesFromTemplate"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeCurlyBracesFromTemplate"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("necessaryBrackets1.kt") @@ -5353,7 +5470,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class RemoveExplicitLambdaParameterTypes extends AbstractIntentionTest { public void testAllFilesPresentInRemoveExplicitLambdaParameterTypes() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeExplicitLambdaParameterTypes"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeExplicitLambdaParameterTypes"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("invalidCursorPosition.kt") @@ -5398,7 +5515,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class RemoveExplicitType extends AbstractIntentionTest { public void testAllFilesPresentInRemoveExplicitType() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeExplicitType"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeExplicitType"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("notOnPublic.kt") @@ -5437,7 +5554,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class RemoveExplicitTypeArguments extends AbstractIntentionTest { public void testAllFilesPresentInRemoveExplicitTypeArguments() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeExplicitTypeArguments"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeExplicitTypeArguments"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("fourLiterals.kt") @@ -5561,7 +5678,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class RemoveUnnecessaryParentheses extends AbstractIntentionTest { public void testAllFilesPresentInRemoveUnnecessaryParentheses() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeUnnecessaryParentheses"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeUnnecessaryParentheses"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("necessaryParentheses1.kt") @@ -5648,7 +5765,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceExplicitFunctionLiteralParamWithIt extends AbstractIntentionTest { public void testAllFilesPresentInReplaceExplicitFunctionLiteralParamWithIt() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("applicable_cursofOverParamInInnerLiteral.kt") @@ -5711,7 +5828,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceItWithExplicitFunctionLiteralParam extends AbstractIntentionTest { public void testAllFilesPresentInReplaceItWithExplicitFunctionLiteralParam() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/replaceItWithExplicitFunctionLiteralParam"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/replaceItWithExplicitFunctionLiteralParam"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("applicable.kt") @@ -5750,7 +5867,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceWithOperatorAssignment extends AbstractIntentionTest { public void testAllFilesPresentInReplaceWithOperatorAssignment() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/replaceWithOperatorAssignment"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/replaceWithOperatorAssignment"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("illegalMultipleOperators.kt") @@ -5813,7 +5930,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceWithOrdinaryAssignment extends AbstractIntentionTest { public void testAllFilesPresentInReplaceWithOrdinaryAssignment() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/replaceWithOrdinaryAssignment"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/replaceWithOrdinaryAssignment"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("complexRightExpression.kt") @@ -5846,7 +5963,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class SimplifyBooleanWithConstants extends AbstractIntentionTest { public void testAllFilesPresentInSimplifyBooleanWithConstants() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/simplifyBooleanWithConstants"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/simplifyBooleanWithConstants"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("deeplyParenthesized.kt") @@ -5975,7 +6092,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class SimplifyNegatedBinaryExpression extends AbstractIntentionTest { public void testAllFilesPresentInSimplifyNegatedBinaryExpression() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/simplifyNegatedBinaryExpression"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/simplifyNegatedBinaryExpression"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("equals.kt") @@ -6057,7 +6174,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class SpecifyExplicitLambdaSignature extends AbstractIntentionTest { public void testAllFilesPresentInSpecifyExplicitLambdaSignature() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/specifyExplicitLambdaSignature"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/specifyExplicitLambdaSignature"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("coercionToUnit.kt") @@ -6144,7 +6261,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class SpecifyTypeExplicitly extends AbstractIntentionTest { public void testAllFilesPresentInSpecifyTypeExplicitly() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/specifyTypeExplicitly"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/specifyTypeExplicitly"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("badCaretPosition.kt") @@ -6225,7 +6342,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class SplitIf extends AbstractIntentionTest { public void testAllFilesPresentInSplitIf() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/splitIf"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/splitIf"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("splitIfAndOr.kt") @@ -6378,7 +6495,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class SwapBinaryExpression extends AbstractIntentionTest { public void testAllFilesPresentInSwapBinaryExpression() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/swapBinaryExpression"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/swapBinaryExpression"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("assignment.kt") @@ -6693,7 +6810,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @RunWith(JUnit3RunnerWithInners.class) public static class ToInfixCall extends AbstractIntentionTest { public void testAllFilesPresentInToInfixCall() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/toInfixCall"), Pattern.compile("^(.+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/toInfixCall"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("binaryExpressionArgument.kt") diff --git a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java index 0ed8297914c..f48e3b36334 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java @@ -32,7 +32,7 @@ import java.util.regex.Pattern; @RunWith(JUnit3RunnerWithInners.class) public class QuickFixTestGenerated extends AbstractQuickFixTest { public void testAllFilesPresentInQuickfix() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("anonymousObject.kt") @@ -136,7 +136,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { } public void testAllFilesPresentInAbstract() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/abstract"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/abstract"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("mustBeInitializedOrBeAbstract.kt") @@ -181,7 +181,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class AddStarProjections extends AbstractQuickFixTest { public void testAllFilesPresentInAddStarProjections() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addStarProjections"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addStarProjections"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("qualifiedArrayList.kt") @@ -225,7 +225,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class Cast extends AbstractQuickFixTest { public void testAllFilesPresentInCast() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addStarProjections/cast"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addStarProjections/cast"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("changeToStarProjection.kt") @@ -246,7 +246,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class CheckType extends AbstractQuickFixTest { public void testAllFilesPresentInCheckType() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addStarProjections/checkType"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addStarProjections/checkType"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("changeToStarProjectionMultipleParameters.kt") @@ -273,7 +273,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class JavaClass extends AbstractQuickFixTest { public void testAllFilesPresentInJavaClass() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addStarProjections/javaClass"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addStarProjections/javaClass"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("fooOfC2.kt") @@ -306,7 +306,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class When extends AbstractQuickFixTest { public void testAllFilesPresentInWhen() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addStarProjections/when"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addStarProjections/when"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("qualifiedArrayList.kt") @@ -352,7 +352,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class AutoImports extends AbstractQuickFixTest { public void testAllFilesPresentInAutoImports() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/autoImports"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/autoImports"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("checkNoStackOverflowInImportInnerClassInCurrentFile.kt") @@ -493,7 +493,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { } public void testAllFilesPresentInChangeSignature() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/changeSignature"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/changeSignature"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("changeFunctionLiteralParameters1.kt") @@ -610,7 +610,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class CheckArguments extends AbstractQuickFixTest { public void testAllFilesPresentInCheckArguments() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/checkArguments"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/checkArguments"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("invokeOnString.kt") @@ -667,7 +667,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class ConflictingImports extends AbstractQuickFixTest { public void testAllFilesPresentInConflictingImports() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/conflictingImports"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/conflictingImports"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("removeConflictingImport.kt") @@ -682,7 +682,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class CreateFromUsage extends AbstractQuickFixTest { public void testAllFilesPresentInCreateFromUsage() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("idea/testData/quickfix/createFromUsage/createClass") @@ -690,7 +690,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class CreateClass extends AbstractQuickFixTest { public void testAllFilesPresentInCreateClass() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("idea/testData/quickfix/createFromUsage/createClass/annotationEntry") @@ -698,7 +698,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class AnnotationEntry extends AbstractQuickFixTest { public void testAllFilesPresentInAnnotationEntry() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/annotationEntry"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/annotationEntry"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("annotationNoBrackets.kt") @@ -755,7 +755,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class CallExpression extends AbstractQuickFixTest { public void testAllFilesPresentInCallExpression() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/callExpression"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/callExpression"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("callInAnnotationEntry.kt") @@ -943,7 +943,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class TypeArguments extends AbstractQuickFixTest { public void testAllFilesPresentInTypeArguments() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("callWithStarProjection.kt") @@ -1025,7 +1025,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class DelegationSpecifier extends AbstractQuickFixTest { public void testAllFilesPresentInDelegationSpecifier() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("classDelegatorToSuperclass.kt") @@ -1076,7 +1076,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class ImportDirective extends AbstractQuickFixTest { public void testAllFilesPresentInImportDirective() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/importDirective"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/importDirective"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("annotationInPackage.kt") @@ -1163,7 +1163,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class ReferenceExpression extends AbstractQuickFixTest { public void testAllFilesPresentInReferenceExpression() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/referenceExpression"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/referenceExpression"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("annotationNoReceiver.kt") @@ -1340,7 +1340,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class TypeReference extends AbstractQuickFixTest { public void testAllFilesPresentInTypeReference() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/typeReference"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/typeReference"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("annotationNotQualifierNoTypeArgs.kt") @@ -1458,7 +1458,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class CreateFunction extends AbstractQuickFixTest { public void testAllFilesPresentInCreateFunction() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations") @@ -1466,7 +1466,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class BinaryOperations extends AbstractQuickFixTest { public void testAllFilesPresentInBinaryOperations() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("customOperationOnUserType.kt") @@ -1559,7 +1559,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class Call extends AbstractQuickFixTest { public void testAllFilesPresentInCall() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/call"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/call"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("callInAnnotationEntry.kt") @@ -1849,7 +1849,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class TypeArguments extends AbstractQuickFixTest { public void testAllFilesPresentInTypeArguments() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("callWithStarProjection.kt") @@ -1925,7 +1925,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class Component extends AbstractQuickFixTest { public void testAllFilesPresentInComponent() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/component"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/component"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("createComponentFromUsage1.kt") @@ -1952,7 +1952,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class DelegateAccessors extends AbstractQuickFixTest { public void testAllFilesPresentInDelegateAccessors() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/delegateAccessors"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/delegateAccessors"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("val.kt") @@ -1985,7 +1985,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class Get extends AbstractQuickFixTest { public void testAllFilesPresentInGet() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/get"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/get"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("createGetFromUsage1.kt") @@ -2066,7 +2066,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class HasNext extends AbstractQuickFixTest { public void testAllFilesPresentInHasNext() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/hasNext"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/hasNext"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("createHasNextFromUsage1.kt") @@ -2087,7 +2087,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class Invoke extends AbstractQuickFixTest { public void testAllFilesPresentInInvoke() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/invoke"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/invoke"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("invokeOnLibType.kt") @@ -2120,7 +2120,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class Iterator extends AbstractQuickFixTest { public void testAllFilesPresentInIterator() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/iterator"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/iterator"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("createIteratorFromUsage1.kt") @@ -2147,7 +2147,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class Next extends AbstractQuickFixTest { public void testAllFilesPresentInNext() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/next"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/next"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("createNextFromUsage1.kt") @@ -2168,7 +2168,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class Set extends AbstractQuickFixTest { public void testAllFilesPresentInSet() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/set"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/set"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("createSetFromUsage1.kt") @@ -2195,7 +2195,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class UnaryOperations extends AbstractQuickFixTest { public void testAllFilesPresentInUnaryOperations() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/unaryOperations"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/unaryOperations"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("incOnUserType.kt") @@ -2235,7 +2235,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class CreateSecondaryConstructor extends AbstractQuickFixTest { public void testAllFilesPresentInCreateSecondaryConstructor() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createSecondaryConstructor"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createSecondaryConstructor"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("callWithExpectedType.kt") @@ -2304,7 +2304,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class CreateVariable extends AbstractQuickFixTest { public void testAllFilesPresentInCreateVariable() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("idea/testData/quickfix/createFromUsage/createVariable/localVariable") @@ -2312,7 +2312,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class LocalVariable extends AbstractQuickFixTest { public void testAllFilesPresentInLocalVariable() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable/localVariable"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable/localVariable"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("assignedInFun.kt") @@ -2423,7 +2423,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class Parameter extends AbstractQuickFixTest { public void testAllFilesPresentInParameter() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable/parameter"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable/parameter"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("assignedInFun.kt") @@ -2684,7 +2684,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractQuickFixTest { public void testAllFilesPresentInProperty() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable/property"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable/property"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("callOnUserType.kt") @@ -2869,7 +2869,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { } public void testAllFilesPresentInDeprecatedSymbolUsage() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("callWithError.kt") @@ -3491,7 +3491,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class Expressions extends AbstractQuickFixTest { public void testAllFilesPresentInExpressions() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/expressions"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/expressions"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("removeStaticTypeAssertion.kt") @@ -3578,7 +3578,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class InsertDelegationCall extends AbstractQuickFixTest { public void testAllFilesPresentInInsertDelegationCall() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/insertDelegationCall"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/insertDelegationCall"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("nonApplicableInsertSuper.kt") @@ -3641,7 +3641,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { } public void testAllFilesPresentInMigration() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("idea/testData/quickfix/migration/bracketsAnnotations") @@ -3649,7 +3649,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class BracketsAnnotations extends AbstractQuickFixTest { public void testAllFilesPresentInBracketsAnnotations() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/bracketsAnnotations"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/bracketsAnnotations"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("basic.kt") @@ -3664,7 +3664,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class EnumConstructor extends AbstractQuickFixTest { public void testAllFilesPresentInEnumConstructor() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/enumConstructor"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/enumConstructor"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("noDelimiterWithInitializerFirst.kt") @@ -3739,7 +3739,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class EnumDelimiter extends AbstractQuickFixTest { public void testAllFilesPresentInEnumDelimiter() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/enumDelimiter"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/enumDelimiter"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("commaNoSemicolon.kt") @@ -3850,7 +3850,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class LambdaSyntax extends AbstractQuickFixTest { public void testAllFilesPresentInLambdaSyntax() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/lambdaSyntax"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/lambdaSyntax"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("labelInLiteralArgument.kt") @@ -3964,7 +3964,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceJavaClassAsAnnotationParameter extends AbstractQuickFixTest { public void testAllFilesPresentInReplaceJavaClassAsAnnotationParameter() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/replaceJavaClassAsAnnotationParameter"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/replaceJavaClassAsAnnotationParameter"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("arrayRuntime.kt") @@ -4003,7 +4003,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class TraitToInterface extends AbstractQuickFixTest { public void testAllFilesPresentInTraitToInterface() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/traitToInterface"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/traitToInterface"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("traitToInterface.kt") @@ -4031,7 +4031,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { } public void testAllFilesPresentInModifiers() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/modifiers"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/modifiers"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("cannotMakeClassAnnotation.kt") @@ -4195,7 +4195,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class AddOpenToClassDeclaration extends AbstractQuickFixTest { public void testAllFilesPresentInAddOpenToClassDeclaration() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/modifiers/addOpenToClassDeclaration"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/modifiers/addOpenToClassDeclaration"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("enumSupertype.kt") @@ -4269,7 +4269,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class FinalJavaClass extends AbstractQuickFixTest { public void testAllFilesPresentInFinalJavaClass() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaClass"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaClass"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaClass/javaCode") @@ -4277,7 +4277,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class JavaCode extends AbstractQuickFixTest { public void testAllFilesPresentInJavaCode() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaClass/javaCode"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaClass/javaCode"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } } @@ -4290,7 +4290,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class Nullables extends AbstractQuickFixTest { public void testAllFilesPresentInNullables() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/nullables"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/nullables"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("removeRedundantNullable.kt") @@ -4322,7 +4322,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class UnsafeInfixCall extends AbstractQuickFixTest { public void testAllFilesPresentInUnsafeInfixCall() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/nullables/unsafeInfixCall"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/nullables/unsafeInfixCall"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("unsafeInfixCall.kt") @@ -4338,7 +4338,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class Override extends AbstractQuickFixTest { public void testAllFilesPresentInOverride() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/override"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/override"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("changeToInvocation.kt") @@ -4508,7 +4508,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { } public void testAllFilesPresentInNothingToOverride() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/override/nothingToOverride"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/override/nothingToOverride"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("changeParameterType.kt") @@ -4613,7 +4613,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class TypeMismatchOnOverride extends AbstractQuickFixTest { public void testAllFilesPresentInTypeMismatchOnOverride() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/override/typeMismatchOnOverride"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/override/typeMismatchOnOverride"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("cantChangeMultipleOverriddenPropertiesTypes.kt") @@ -4725,7 +4725,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class PlatformClasses extends AbstractQuickFixTest { public void testAllFilesPresentInPlatformClasses() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/platformClasses"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/platformClasses"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("mapPlatformClassToKotlin1.kt") @@ -4758,7 +4758,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class RemoveUnused extends AbstractQuickFixTest { public void testAllFilesPresentInRemoveUnused() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/removeUnused"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/removeUnused"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("unusedClass.kt") @@ -4797,7 +4797,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class RemoveUnusedReceiver extends AbstractQuickFixTest { public void testAllFilesPresentInRemoveUnusedReceiver() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/removeUnusedReceiver"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/removeUnusedReceiver"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("inFunction.kt") @@ -4818,7 +4818,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class Supercalls extends AbstractQuickFixTest { public void testAllFilesPresentInSupercalls() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/supercalls"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/supercalls"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("typeArgumentsRedundantInSuperQualifier.kt") @@ -4875,7 +4875,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { } public void testAllFilesPresentInSupertypeInitialization() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/supertypeInitialization"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/supertypeInitialization"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("baseConstructorError.kt") @@ -4944,7 +4944,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class Suppress extends AbstractQuickFixTest { public void testAllFilesPresentInSuppress() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("idea/testData/quickfix/suppress/annotationPosition") @@ -4952,7 +4952,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class AnnotationPosition extends AbstractQuickFixTest { public void testAllFilesPresentInAnnotationPosition() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/annotationPosition"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/annotationPosition"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("paramWithModifier.kt") @@ -5033,7 +5033,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class Availability extends AbstractQuickFixTest { public void testAllFilesPresentInAvailability() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/availability"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/availability"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("localFunSuppressForLocal.kt") @@ -5102,7 +5102,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class DeclarationKinds extends AbstractQuickFixTest { public void testAllFilesPresentInDeclarationKinds() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/declarationKinds"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/declarationKinds"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("class.kt") @@ -5177,7 +5177,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class ErrorRecovery extends AbstractQuickFixTest { public void testAllFilesPresentInErrorRecovery() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/errorRecovery"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/errorRecovery"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("nonStringInSuppress.kt") @@ -5198,7 +5198,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class ForStatement extends AbstractQuickFixTest { public void testAllFilesPresentInForStatement() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/forStatement"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/forStatement"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("andAnd.kt") @@ -5440,7 +5440,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class Unavailable extends AbstractQuickFixTest { public void testAllFilesPresentInUnavailable() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/forStatement/unavailable"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/forStatement/unavailable"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("inAnnotationArgument.kt") @@ -5517,7 +5517,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class TypeAddition extends AbstractQuickFixTest { public void testAllFilesPresentInTypeAddition() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeAddition"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeAddition"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("ambiguousFunctionReturnType.kt") @@ -5604,7 +5604,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class TypeImports extends AbstractQuickFixTest { public void testAllFilesPresentInTypeImports() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeImports"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeImports"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("hasThisImport.kt") @@ -5649,7 +5649,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { } public void testAllFilesPresentInTypeMismatch() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("anonymousObjectInCall.kt") @@ -5837,7 +5837,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class Casts extends AbstractQuickFixTest { public void testAllFilesPresentInCasts() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/casts"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/casts"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("castToFunctionType.kt") @@ -5900,7 +5900,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class ComponentFunctionReturnTypeMismatch extends AbstractQuickFixTest { public void testAllFilesPresentInComponentFunctionReturnTypeMismatch() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("componentFunctionReturnTypeMismatch1.kt") @@ -5939,7 +5939,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class FixOverloadedOperator extends AbstractQuickFixTest { public void testAllFilesPresentInFixOverloadedOperator() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/fixOverloadedOperator"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/fixOverloadedOperator"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("changeNotFunctionReturnType.kt") @@ -5966,7 +5966,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class ParameterTypeMismatch extends AbstractQuickFixTest { public void testAllFilesPresentInParameterTypeMismatch() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/parameterTypeMismatch"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/parameterTypeMismatch"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("changeFunctionParameterType1.kt") @@ -6023,7 +6023,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class TypeMismatchOnReturnedExpression extends AbstractQuickFixTest { public void testAllFilesPresentInTypeMismatchOnReturnedExpression() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("assignmentTypeMismatch.kt") @@ -6141,7 +6141,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class TypeProjection extends AbstractQuickFixTest { public void testAllFilesPresentInTypeProjection() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeProjection"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeProjection"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("conflictingProjection.kt") @@ -6192,7 +6192,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class Variables extends AbstractQuickFixTest { public void testAllFilesPresentInVariables() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/variables"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/variables"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("unusedVariableWithInitializer.kt") @@ -6212,7 +6212,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class ChangeMutability extends AbstractQuickFixTest { public void testAllFilesPresentInChangeMutability() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/variables/changeMutability"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/variables/changeMutability"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("valOverrideVar.kt") @@ -6251,7 +6251,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class ChangeToBackingField extends AbstractQuickFixTest { public void testAllFilesPresentInChangeToBackingField() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/variables/changeToBackingField"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/variables/changeToBackingField"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("bFRequired.kt") @@ -6272,7 +6272,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class ChangeToFunctionInvocation extends AbstractQuickFixTest { public void testAllFilesPresentInChangeToFunctionInvocation() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/variables/changeToFunctionInvocation"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/variables/changeToFunctionInvocation"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("funInvWithoutParentheses.kt") @@ -6299,7 +6299,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { } public void testAllFilesPresentInChangeToPropertyName() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/variables/changeToPropertyName"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/variables/changeToPropertyName"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("customAccessors.kt") @@ -6326,7 +6326,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class RemoveValVarFromParameter extends AbstractQuickFixTest { public void testAllFilesPresentInRemoveValVarFromParameter() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/variables/removeValVarFromParameter"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/variables/removeValVarFromParameter"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("catchParameter.kt") @@ -6372,7 +6372,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @RunWith(JUnit3RunnerWithInners.class) public static class When extends AbstractQuickFixTest { public void testAllFilesPresentInWhen() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/when"), Pattern.compile("^(\\w+)\\.kt$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/when"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); } @TestMetadata("breakInWhen.kt")