Regenerate tests with TargetBackend.ANY remove and using runTest with this

This commit is contained in:
Nikolay Krasko
2019-10-18 13:42:18 +03:00
parent 28abfe6dfa
commit 4ed64b0283
307 changed files with 8038 additions and 8341 deletions
@@ -8,7 +8,6 @@ package org.jetbrains.kotlin.visualizer.fir;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TargetBackend;
import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.runner.RunWith;
@@ -22,11 +21,11 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class)
public class FirVisualizerForRawFirDataGenerated extends AbstractFirVisualizer {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doFirBuilderDataTest, TargetBackend.ANY, testDataFilePath);
KotlinTestUtils.runTest(this::doFirBuilderDataTest, this, testDataFilePath);
}
public void testAllFilesPresentInRawBuilder() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/fir/psi2fir/testData/rawBuilder"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/fir/psi2fir/testData/rawBuilder"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("compiler/fir/psi2fir/testData/rawBuilder/declarations")
@@ -34,11 +33,11 @@ public class FirVisualizerForRawFirDataGenerated extends AbstractFirVisualizer {
@RunWith(JUnit3RunnerWithInners.class)
public static class Declarations extends AbstractFirVisualizer {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doFirBuilderDataTest, TargetBackend.ANY, testDataFilePath);
KotlinTestUtils.runTest(this::doFirBuilderDataTest, this, testDataFilePath);
}
public void testAllFilesPresentInDeclarations() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/fir/psi2fir/testData/rawBuilder/declarations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/fir/psi2fir/testData/rawBuilder/declarations"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("complexTypes.kt")
@@ -147,11 +146,11 @@ public class FirVisualizerForRawFirDataGenerated extends AbstractFirVisualizer {
@RunWith(JUnit3RunnerWithInners.class)
public static class Expressions extends AbstractFirVisualizer {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doFirBuilderDataTest, TargetBackend.ANY, testDataFilePath);
KotlinTestUtils.runTest(this::doFirBuilderDataTest, this, testDataFilePath);
}
public void testAllFilesPresentInExpressions() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/fir/psi2fir/testData/rawBuilder/expressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/fir/psi2fir/testData/rawBuilder/expressions"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("annotated.kt")
@@ -8,7 +8,6 @@ package org.jetbrains.kotlin.visualizer.fir;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TargetBackend;
import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.runner.RunWith;
@@ -22,11 +21,11 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class)
public class FirVisualizerForUncommonCasesGenerated extends AbstractFirVisualizer {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doUncommonCasesTest, TargetBackend.ANY, testDataFilePath);
KotlinTestUtils.runTest(this::doUncommonCasesTest, this, testDataFilePath);
}
public void testAllFilesPresentInTestFiles() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/visualizer/testData/uncommonCases/testFiles"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/visualizer/testData/uncommonCases/testFiles"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("dataClass.kt")
@@ -8,7 +8,6 @@ package org.jetbrains.kotlin.visualizer.psi;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TargetBackend;
import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.runner.RunWith;
@@ -22,11 +21,11 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class)
public class PsiVisualizerForRawFirDataGenerated extends AbstractPsiVisualizer {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doFirBuilderDataTest, TargetBackend.ANY, testDataFilePath);
KotlinTestUtils.runTest(this::doFirBuilderDataTest, this, testDataFilePath);
}
public void testAllFilesPresentInRawBuilder() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/fir/psi2fir/testData/rawBuilder"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/fir/psi2fir/testData/rawBuilder"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("compiler/fir/psi2fir/testData/rawBuilder/declarations")
@@ -34,11 +33,11 @@ public class PsiVisualizerForRawFirDataGenerated extends AbstractPsiVisualizer {
@RunWith(JUnit3RunnerWithInners.class)
public static class Declarations extends AbstractPsiVisualizer {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doFirBuilderDataTest, TargetBackend.ANY, testDataFilePath);
KotlinTestUtils.runTest(this::doFirBuilderDataTest, this, testDataFilePath);
}
public void testAllFilesPresentInDeclarations() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/fir/psi2fir/testData/rawBuilder/declarations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/fir/psi2fir/testData/rawBuilder/declarations"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("complexTypes.kt")
@@ -147,11 +146,11 @@ public class PsiVisualizerForRawFirDataGenerated extends AbstractPsiVisualizer {
@RunWith(JUnit3RunnerWithInners.class)
public static class Expressions extends AbstractPsiVisualizer {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doFirBuilderDataTest, TargetBackend.ANY, testDataFilePath);
KotlinTestUtils.runTest(this::doFirBuilderDataTest, this, testDataFilePath);
}
public void testAllFilesPresentInExpressions() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/fir/psi2fir/testData/rawBuilder/expressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/fir/psi2fir/testData/rawBuilder/expressions"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("annotated.kt")
@@ -8,7 +8,6 @@ package org.jetbrains.kotlin.visualizer.psi;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TargetBackend;
import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.runner.RunWith;
@@ -22,11 +21,11 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class)
public class PsiVisualizerForUncommonCasesGenerated extends AbstractPsiVisualizer {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doUncommonCasesTest, TargetBackend.ANY, testDataFilePath);
KotlinTestUtils.runTest(this::doUncommonCasesTest, this, testDataFilePath);
}
public void testAllFilesPresentInTestFiles() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/visualizer/testData/uncommonCases/testFiles"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/visualizer/testData/uncommonCases/testFiles"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("dataClass.kt")