From 9ef8370871b54f726b5b727b2dd1caf2964dbc5f Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Fri, 9 Oct 2015 18:08:44 +0300 Subject: [PATCH] Allow to create quickfix multifile tests in single file It simplifies creating new tests --- .idea/dictionaries/Nikolay_Krasko.xml | 1 + .../kotlin/generators/tests/GenerateTests.kt | 2 +- .../generator/SimpleTestMethodModel.java | 2 +- .../importInFirstPartInUserType.after.kt | 7 - ...InFirstPartInUserType.before.Dependency.kt | 7 - ...importInFirstPartInUserType.before.Main.kt | 5 - .../importInFirstPartInUserType.test | 28 +++ .../AbstractQuickFixMultiFileTest.java | 166 +++++++++++++++--- .../QuickFixMultiFileTestGenerated.java | 102 +++++------ 9 files changed, 221 insertions(+), 99 deletions(-) delete mode 100644 idea/testData/quickfix/autoImports/importInFirstPartInUserType.after.kt delete mode 100644 idea/testData/quickfix/autoImports/importInFirstPartInUserType.before.Dependency.kt delete mode 100644 idea/testData/quickfix/autoImports/importInFirstPartInUserType.before.Main.kt create mode 100644 idea/testData/quickfix/autoImports/importInFirstPartInUserType.test diff --git a/.idea/dictionaries/Nikolay_Krasko.xml b/.idea/dictionaries/Nikolay_Krasko.xml index ee5f1157ac9..361abfec3ce 100644 --- a/.idea/dictionaries/Nikolay_Krasko.xml +++ b/.idea/dictionaries/Nikolay_Krasko.xml @@ -17,6 +17,7 @@ redeclarations subclassed subgraph + substep \ No newline at end of file diff --git a/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt b/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt index 2779ebf01f6..fc56f3467a2 100644 --- a/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt +++ b/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt @@ -425,7 +425,7 @@ fun main(args: Array) { } testClass() { - model("quickfix", pattern = """^(\w+)\.before\.Main\.\w+$""", testMethod = "doTestWithExtraFile") + model("quickfix", pattern = """^(\w+)\.((before\.Main\.\w+)|(test))$""", testMethod = "doTestWithExtraFile") } testClass() { diff --git a/generators/src/org/jetbrains/kotlin/generators/tests/generator/SimpleTestMethodModel.java b/generators/src/org/jetbrains/kotlin/generators/tests/generator/SimpleTestMethodModel.java index 6a71e26be81..81444c2b580 100644 --- a/generators/src/org/jetbrains/kotlin/generators/tests/generator/SimpleTestMethodModel.java +++ b/generators/src/org/jetbrains/kotlin/generators/tests/generator/SimpleTestMethodModel.java @@ -109,7 +109,7 @@ public class SimpleTestMethodModel implements TestMethodModel { Matcher matcher = filenamePattern.matcher(file.getName()); boolean found = matcher.find(); assert found : file.getName() + " isn't matched by regex " + filenamePattern.pattern(); - assert matcher.groupCount() == 1 : filenamePattern.pattern(); + assert matcher.groupCount() >= 1 : filenamePattern.pattern(); String extractedName = matcher.group(1); assert extractedName != null : "extractedName should not be null: " + filenamePattern.pattern(); diff --git a/idea/testData/quickfix/autoImports/importInFirstPartInUserType.after.kt b/idea/testData/quickfix/autoImports/importInFirstPartInUserType.after.kt deleted file mode 100644 index 50b103cf9f0..00000000000 --- a/idea/testData/quickfix/autoImports/importInFirstPartInUserType.after.kt +++ /dev/null @@ -1,7 +0,0 @@ -// "Import" "true" -// ERROR: Unresolved reference: Some -package testing - -import some.Some - -class TestClass: Some.InnerInSome() \ No newline at end of file diff --git a/idea/testData/quickfix/autoImports/importInFirstPartInUserType.before.Dependency.kt b/idea/testData/quickfix/autoImports/importInFirstPartInUserType.before.Dependency.kt deleted file mode 100644 index a99e62abb55..00000000000 --- a/idea/testData/quickfix/autoImports/importInFirstPartInUserType.before.Dependency.kt +++ /dev/null @@ -1,7 +0,0 @@ -package some - -public class Some { - public open class InnerInSome { - - } -} \ No newline at end of file diff --git a/idea/testData/quickfix/autoImports/importInFirstPartInUserType.before.Main.kt b/idea/testData/quickfix/autoImports/importInFirstPartInUserType.before.Main.kt deleted file mode 100644 index 72b4d7ed41d..00000000000 --- a/idea/testData/quickfix/autoImports/importInFirstPartInUserType.before.Main.kt +++ /dev/null @@ -1,5 +0,0 @@ -// "Import" "true" -// ERROR: Unresolved reference: Some -package testing - -class TestClass: Some.InnerInSome() \ No newline at end of file diff --git a/idea/testData/quickfix/autoImports/importInFirstPartInUserType.test b/idea/testData/quickfix/autoImports/importInFirstPartInUserType.test new file mode 100644 index 00000000000..44fbf22e2f4 --- /dev/null +++ b/idea/testData/quickfix/autoImports/importInFirstPartInUserType.test @@ -0,0 +1,28 @@ +// FILE: first.before.kt +// "Import" "true" +// ERROR: Unresolved reference: Some +package testing + +class TestClass: Some.InnerInSome() + + + +// FILE: second.kt +package some + +public class Some { + public open class InnerInSome { + + } +} + + + +// FILE: first.after.kt +// "Import" "true" +// ERROR: Unresolved reference: Some +package testing + +import some.Some + +class TestClass: Some.InnerInSome() \ No newline at end of file diff --git a/idea/tests/org/jetbrains/kotlin/idea/quickfix/AbstractQuickFixMultiFileTest.java b/idea/tests/org/jetbrains/kotlin/idea/quickfix/AbstractQuickFixMultiFileTest.java index f9bf5445274..652fc3b2f07 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/quickfix/AbstractQuickFixMultiFileTest.java +++ b/idea/tests/org/jetbrains/kotlin/idea/quickfix/AbstractQuickFixMultiFileTest.java @@ -29,14 +29,17 @@ import com.intellij.openapi.extensions.Extensions; import com.intellij.openapi.projectRoots.Sdk; import com.intellij.openapi.util.Pair; import com.intellij.openapi.util.io.FileUtil; +import com.intellij.openapi.util.text.StringUtil; import com.intellij.psi.PsiFile; import com.intellij.util.ArrayUtil; import com.intellij.util.containers.ContainerUtil; import com.intellij.util.ui.UIUtil; import junit.framework.ComparisonFailure; import kotlin.ArraysKt; +import kotlin.CollectionsKt; import kotlin.jvm.functions.Function1; import org.jetbrains.annotations.NotNull; +import org.jetbrains.kotlin.idea.JetFileType; import org.jetbrains.kotlin.idea.KotlinDaemonAnalyzerTestCase; import org.jetbrains.kotlin.idea.quickfix.utils.QuickfixTestUtilsKt; import org.jetbrains.kotlin.idea.test.ConfigLibraryUtil; @@ -52,6 +55,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.List; +import java.util.Map; public abstract class AbstractQuickFixMultiFileTest extends KotlinDaemonAnalyzerTestCase { @@ -73,7 +77,13 @@ public abstract class AbstractQuickFixMultiFileTest extends KotlinDaemonAnalyzer protected void doTestWithExtraFile(String beforeFileName) throws Exception { enableInspections(beforeFileName); - doTest(beforeFileName, true); + + if (beforeFileName.endsWith(".test")) { + doMultiFileTest(beforeFileName); + } + else { + doTest(beforeFileName, true); + } } private void enableInspections(String beforeFileName) throws IOException, ClassNotFoundException { @@ -113,6 +123,96 @@ public abstract class AbstractQuickFixMultiFileTest extends KotlinDaemonAnalyzer super.tearDown(); } + protected void doMultiFileTest(final String beforeFileName) throws Exception { + String multifileText = FileUtil.loadFile(new File(beforeFileName), true); + + final List subFiles = JetTestUtils.createTestFiles( + "single.kt", + multifileText, + new JetTestUtils.TestFileFactoryNoModules() { + @NotNull + @Override + public TestFile create(@NotNull String fileName, @NotNull String text, @NotNull Map directives) { + if (text.startsWith("// FILE")) { + String firstLineDropped = StringUtil.substringAfter(text, "\n"); + assert firstLineDropped != null; + + text = firstLineDropped; + } + return new TestFile(fileName, text); + } + }); + + final TestFile afterFile = CollectionsKt.find(subFiles, new Function1() { + @Override + public Boolean invoke(TestFile file) { + return file.name.contains(".after"); + } + }); + final TestFile beforeFile = CollectionsKt.find(subFiles, new Function1() { + @Override + public Boolean invoke(TestFile file) { + return file.name.contains(".before"); + } + }); + + assert beforeFile != null; + assert afterFile != null; + + subFiles.remove(afterFile); + subFiles.remove(beforeFile); + + for (TestFile file : subFiles) { + configureByText(JetFileType.INSTANCE, file.content); + } + + configureByText(JetFileType.INSTANCE, beforeFile.content); + + CommandProcessor.getInstance().executeCommand(getProject(), new Runnable() { + @Override + public void run() { + try { + PsiFile psiFile = getFile(); + + Pair pair = LightQuickFixTestCase.parseActionHint(psiFile, beforeFile.content); + String text = pair.getFirst(); + + boolean actionShouldBeAvailable = pair.getSecond(); + + if (psiFile instanceof JetFile) { + DirectiveBasedActionUtils.INSTANCE$.checkForUnexpectedErrors((JetFile) psiFile); + } + + doAction(text, actionShouldBeAvailable, getTestName(false)); + + String actualText = getFile().getText(); + String afterText = new StringBuilder(actualText).insert(getEditor().getCaretModel().getOffset(), "").toString(); + + if (pair.second && !afterText.equals(afterFile.content)) { + StringBuilder actualTestFile = new StringBuilder(); + actualTestFile.append("// FILE: ").append(beforeFile.name).append("\n").append(beforeFile.content); + for (TestFile file : subFiles) { + actualTestFile.append("// FILE: ").append(file.name).append("\n").append(file.content); + } + actualTestFile.append("// FILE: ").append(afterFile.name).append("\n").append(afterText); + + JetTestUtils.assertEqualsToFile(new File(beforeFileName), actualTestFile.toString()); + } + } + catch (ComparisonFailure e) { + throw e; + } + catch (AssertionError e) { + throw e; + } + catch (Throwable e) { + e.printStackTrace(); + fail(getTestName(true)); + } + } + }, "", ""); + } + private void doTest(final String beforeFileName, boolean withExtraFile) throws Exception { String testDataPath = getTestDataPath(); File mainFile = new File(testDataPath + beforeFileName); @@ -174,6 +274,29 @@ public abstract class AbstractQuickFixMultiFileTest extends KotlinDaemonAnalyzer } doAction(text, actionShouldBeAvailable, beforeFileName); + + if (actionShouldBeAvailable) { + checkResultByFile(beforeFileName.replace(".before.Main.", ".after.")); + + PsiFile mainFile = myFile; + String mainFileName = mainFile.getName(); + for (PsiFile file : mainFile.getContainingDirectory().getFiles()) { + String fileName = file.getName(); + if (fileName.equals(mainFileName) || !fileName.startsWith(extraFileNamePrefix(myFile.getName()))) continue; + + myFile = file; + String extraFileFullPath = beforeFileName.replace(mainFileName, fileName); + try { + checkResultByFile(extraFileFullPath.replace(".before.", ".after.")); + } + catch (AssertionError e) { + if (e.getMessage().startsWith("Cannot find file")) { + checkResultByFile(extraFileFullPath); + } + else throw e; + } + } + } } catch (ComparisonFailure e) { throw e; @@ -193,8 +316,7 @@ public abstract class AbstractQuickFixMultiFileTest extends KotlinDaemonAnalyzer } @SuppressWarnings({"HardCodedStringLiteral"}) - public void doAction(String text, boolean actionShouldBeAvailable, String testFullPath) - throws Exception { + public void doAction(String text, boolean actionShouldBeAvailable, String testFilePath) throws Exception { List availableActions = getAvailableActions(); IntentionAction action = LightQuickFixTestCase.findActionWithText(availableActions, text); @@ -202,7 +324,7 @@ public abstract class AbstractQuickFixMultiFileTest extends KotlinDaemonAnalyzer if (actionShouldBeAvailable) { List texts = getActionsTexts(availableActions); Collection infos = doHighlighting(); - fail("Action with text '" + text + "' is not available in test " + testFullPath + "\n" + + fail("Action with text '" + text + "' is not available in test " + testFilePath + "\n" + "Available actions (" + texts.size() + "): " + texts + "\n" + availableActions + "\n" + "Infos:" + infos); @@ -213,39 +335,19 @@ public abstract class AbstractQuickFixMultiFileTest extends KotlinDaemonAnalyzer } else { if (!actionShouldBeAvailable) { - fail("Action '" + text + "' is available (but must not) in test " + testFullPath); + fail("Action '" + text + "' is available (but must not) in test " + testFilePath); } ShowIntentionActionsHandler.chooseActionAndInvoke(getFile(), getEditor(), action, action.getText()); UIUtil.dispatchAllInvocationEvents(); + //noinspection ConstantConditions if (!shouldBeAvailableAfterExecution()) { IntentionAction afterAction = LightQuickFixTestCase.findActionWithText(getAvailableActions(), text); if (afterAction != null) { - fail("Action '" + text + "' is still available after its invocation in test " + testFullPath); - } - } - - checkResultByFile(testFullPath.replace(".before.Main.", ".after.")); - - PsiFile mainFile = myFile; - String mainFileName = mainFile.getName(); - for (PsiFile file : mainFile.getContainingDirectory().getFiles()) { - String fileName = file.getName(); - if (fileName.equals(mainFileName) || !fileName.startsWith(extraFileNamePrefix(myFile.getName()))) continue; - - myFile = file; - String extraFileFullPath = testFullPath.replace(mainFileName, fileName); - try { - checkResultByFile(extraFileFullPath.replace(".before.", ".after.")); - } - catch (AssertionError e) { - if (e.getMessage().startsWith("Cannot find file")) { - checkResultByFile(extraFileFullPath); - } - else throw e; + fail("Action '" + text + "' is still available after its invocation in test " + testFilePath); } } } @@ -270,4 +372,14 @@ public abstract class AbstractQuickFixMultiFileTest extends KotlinDaemonAnalyzer private static String extraFileNamePrefix(@NotNull String mainFileName) { return mainFileName.replace(".Main.kt", ".").replace(".Main.java", "."); } + + private static class TestFile { + public final String name; + public final String content; + + TestFile(String name, String content) { + this.name = name; + this.content = content; + } + } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiFileTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiFileTestGenerated.java index ee3554fedb6..c5b9ee6097a 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiFileTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiFileTestGenerated.java @@ -32,7 +32,7 @@ import java.util.regex.Pattern; @RunWith(JUnit3RunnerWithInners.class) public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInQuickfix() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("idea/testData/quickfix/addStarProjections") @@ -40,7 +40,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class AddStarProjections extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInAddStarProjections() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addStarProjections"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addStarProjections"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } } @@ -50,7 +50,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class AutoImports extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInAutoImports() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/autoImports"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/autoImports"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("ambiguousNamePreferFromJdk.before.Main.kt") @@ -131,9 +131,9 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes doTestWithExtraFile(fileName); } - @TestMetadata("importInFirstPartInUserType.before.Main.kt") + @TestMetadata("importInFirstPartInUserType.test") public void testImportInFirstPartInUserType() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importInFirstPartInUserType.before.Main.kt"); + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importInFirstPartInUserType.test"); doTestWithExtraFile(fileName); } @@ -311,7 +311,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes } public void testAllFilesPresentInChangeSignature() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/changeSignature"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/changeSignature"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("matchFunctionLiteralWithSAMType.before.Main.kt") @@ -332,7 +332,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class CheckArguments extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInCheckArguments() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/checkArguments"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/checkArguments"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } } @@ -342,7 +342,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class CreateFromUsage extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInCreateFromUsage() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("idea/testData/quickfix/createFromUsage/createClass") @@ -350,7 +350,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class CreateClass extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInCreateClass() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("idea/testData/quickfix/createFromUsage/createClass/annotationEntry") @@ -358,7 +358,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class AnnotationEntry extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInAnnotationEntry() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/annotationEntry"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/annotationEntry"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("nestedGroovyAnnotation.before.Main.kt") @@ -385,7 +385,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class CallExpression extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInCallExpression() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/callExpression"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/callExpression"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("callInAnnotationEntryWithJavaQualifier.before.Main.kt") @@ -459,7 +459,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class TypeArguments extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInTypeArguments() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("javaClassMember.before.Main.kt") @@ -499,7 +499,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class DelegationSpecifier extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInDelegationSpecifier() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("delegatorToNestedJavaSupercall.before.Main.kt") @@ -532,7 +532,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class ImportDirective extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInImportDirective() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/importDirective"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/importDirective"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("annotationWithJavaQualifier.before.Main.kt") @@ -583,7 +583,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class ReferenceExpression extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInReferenceExpression() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/referenceExpression"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/referenceExpression"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("classByNestedGroovyQualifier.before.Main.kt") @@ -646,7 +646,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class TypeReference extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInTypeReference() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/typeReference"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/typeReference"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("annotationJavaTypeReceiver.before.Main.kt") @@ -692,7 +692,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class CreateFunction extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInCreateFunction() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("idea/testData/quickfix/createFromUsage/createFunction/call") @@ -700,7 +700,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class Call extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInCall() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/call"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/call"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("extensionFunOnGroovyType.before.Main.kt") @@ -762,7 +762,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class TypeArguments extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInTypeArguments() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("javaClassMember.before.Main.kt") @@ -792,7 +792,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class CreateSecondaryConstructor extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInCreateSecondaryConstructor() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createSecondaryConstructor"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createSecondaryConstructor"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("delegatorToSuperCallJavaClass.before.Main.kt") @@ -825,7 +825,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class CreateVariable extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInCreateVariable() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter") @@ -833,7 +833,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class Parameter extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInParameter() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable/parameter"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable/parameter"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("platformType.before.Main.kt") @@ -848,7 +848,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInProperty() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable/property"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable/property"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("extensionValOnGroovyType.before.Main.kt") @@ -919,7 +919,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class DeprecatedSymbolUsage extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInDeprecatedSymbolUsage() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("javaDeprecated.before.Main.kt") @@ -945,7 +945,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes } public void testAllFilesPresentInClassUsages() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/classUsages"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/classUsages"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/wholeProject") @@ -953,7 +953,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class WholeProject extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInWholeProject() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/wholeProject"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/wholeProject"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("annotation.before.Main.kt") @@ -993,7 +993,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes } public void testAllFilesPresentInImports() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/imports"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/imports"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("rootPackage.before.Main.kt") @@ -1008,7 +1008,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class TypeArguments extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInTypeArguments() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("platformType.before.Main.kt") @@ -1023,7 +1023,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class WholeProject extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInWholeProject() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/wholeProject"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/wholeProject"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("function.before.Main.kt") @@ -1045,7 +1045,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class Migration extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInMigration() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("idea/testData/quickfix/migration/conflictingExtension") @@ -1053,7 +1053,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class ConflictingExtension extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInConflictingExtension() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/conflictingExtension"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/conflictingExtension"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("removeImports.before.Main.kt") @@ -1074,7 +1074,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class DeprecatedObjectInstanceField extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInDeprecatedObjectInstanceField() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/deprecatedObjectInstanceField"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/deprecatedObjectInstanceField"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("basic.before.Main.java") @@ -1095,7 +1095,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class DeprecatedPackageFacade extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInDeprecatedPackageFacade() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/deprecatedPackageFacade"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/deprecatedPackageFacade"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("basic.before.Main.java") @@ -1116,7 +1116,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class DeprecatedStaticField extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInDeprecatedStaticField() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/deprecatedStaticField"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/deprecatedStaticField"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("cleanUp.before.Main.java") @@ -1191,7 +1191,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class JavaAnnotationPositionedArguments extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInJavaAnnotationPositionedArguments() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/javaAnnotationPositionedArguments"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/javaAnnotationPositionedArguments"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("basicMultiple.before.Main.kt") @@ -1218,7 +1218,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class MissingConstructorKeyword extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInMissingConstructorKeyword() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/missingConstructorKeyword"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/missingConstructorKeyword"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("manyFilesMuitliple.before.Main.kt") @@ -1233,7 +1233,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class ObsoleteLabelSyntax extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInObsoleteLabelSyntax() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/obsoleteLabelSyntax"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/obsoleteLabelSyntax"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("manyFilesMuitliple.before.Main.kt") @@ -1250,7 +1250,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class Modifiers extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInModifiers() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/modifiers"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/modifiers"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("constVal.before.Main.kt") @@ -1264,7 +1264,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class AddOpenToClassDeclaration extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInAddOpenToClassDeclaration() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/modifiers/addOpenToClassDeclaration"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/modifiers/addOpenToClassDeclaration"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaClass") @@ -1272,7 +1272,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class FinalJavaClass extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInFinalJavaClass() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaClass"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaClass"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaClass/javaCode") @@ -1280,7 +1280,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class JavaCode extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInJavaCode() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaClass/javaCode"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaClass/javaCode"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } } @@ -1293,7 +1293,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class Nullables extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInNullables() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/nullables"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/nullables"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } } @@ -1303,7 +1303,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class Override extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInOverride() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/override"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/override"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("idea/testData/quickfix/override/nothingToOverride") @@ -1311,7 +1311,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class NothingToOverride extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInNothingToOverride() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/override/nothingToOverride"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/override/nothingToOverride"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("import.before.Main.kt") @@ -1334,7 +1334,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class PrivateInFiles extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInPrivateInFiles() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/privateInFiles"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/privateInFiles"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("privateTopLevelFunInFile.before.Main.kt") @@ -1367,7 +1367,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class Suppress extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInSuppress() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("idea/testData/quickfix/suppress/forStatement") @@ -1375,7 +1375,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class ForStatement extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInForStatement() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/forStatement"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/forStatement"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } } @@ -1386,7 +1386,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class TypeImports extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInTypeImports() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeImports"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeImports"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("importFromAnotherFile.before.Main.kt") @@ -1401,7 +1401,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class TypeMismatch extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInTypeMismatch() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("idea/testData/quickfix/typeMismatch/genericVarianceViolation") @@ -1409,7 +1409,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class GenericVarianceViolation extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInGenericVarianceViolation() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/genericVarianceViolation"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/genericVarianceViolation"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } @TestMetadata("basicMultiple.before.Main.kt") @@ -1426,7 +1426,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @RunWith(JUnit3RunnerWithInners.class) public static class Variables extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInVariables() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/variables"), Pattern.compile("^(\\w+)\\.before\\.Main\\.\\w+$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/variables"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), true); } }