[Test] Require specifying parser for FIR test. Unify names for FIR tests
Now all tests with `Fir` in name are named accordingly to parser which is used in them -- `FirPsi` or `FirLightTree`. This is needed to keep consistency between different types of tests, because there is no single default in parser mode between different scenarios of using FIR
This commit is contained in:
committed by
Space Team
parent
7e36a88b82
commit
da581f38e1
@@ -12,7 +12,7 @@ import org.jetbrains.kotlin.test.directives.model.DirectivesContainer
|
||||
import org.jetbrains.kotlin.test.directives.model.SimpleDirectivesContainer
|
||||
import org.jetbrains.kotlin.test.model.TestModule
|
||||
import org.jetbrains.kotlin.test.runners.AbstractDiagnosticTest
|
||||
import org.jetbrains.kotlin.test.runners.AbstractFirDiagnosticTest
|
||||
import org.jetbrains.kotlin.test.runners.AbstractFirPsiDiagnosticTest
|
||||
import org.jetbrains.kotlin.test.runners.codegen.*
|
||||
import org.jetbrains.kotlin.test.runners.configurationForClassicAndFirTestsAlongside
|
||||
import org.jetbrains.kotlin.test.services.EnvironmentConfigurator
|
||||
@@ -34,7 +34,7 @@ open class AbstractIrBlackBoxCodegenTestForNoArg : AbstractIrBlackBoxCodegenTest
|
||||
}
|
||||
}
|
||||
|
||||
open class AbstractFirBlackBoxCodegenTestForNoArg : AbstractFirBlackBoxCodegenTest() {
|
||||
open class AbstractFirLightTreeBlackBoxCodegenTestForNoArg : AbstractFirLightTreeBlackBoxCodegenTest() {
|
||||
override fun configure(builder: TestConfigurationBuilder) {
|
||||
super.configure(builder)
|
||||
builder.enableNoArg()
|
||||
@@ -57,7 +57,7 @@ open class AbstractIrBytecodeListingTestForNoArg : AbstractIrBytecodeListingTest
|
||||
}
|
||||
}
|
||||
|
||||
open class AbstractFirBytecodeListingTestForNoArg : AbstractFirBytecodeListingTest() {
|
||||
open class AbstractFirLightTreeBytecodeListingTestForNoArg : AbstractFirLightTreeBytecodeListingTest() {
|
||||
override fun configure(builder: TestConfigurationBuilder) {
|
||||
super.configure(builder)
|
||||
builder.enableNoArg()
|
||||
@@ -73,7 +73,7 @@ abstract class AbstractDiagnosticsTestForNoArg : AbstractDiagnosticTest() {
|
||||
}
|
||||
}
|
||||
|
||||
abstract class AbstractFirDiagnosticsTestForNoArg : AbstractFirDiagnosticTest() {
|
||||
abstract class AbstractFirPsiDiagnosticsTestForNoArg : AbstractFirPsiDiagnosticTest() {
|
||||
override fun configure(builder: TestConfigurationBuilder) {
|
||||
super.configure(builder)
|
||||
builder.configurationForClassicAndFirTestsAlongside()
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ import java.util.regex.Pattern;
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("plugins/noarg/testData/box")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class FirBlackBoxCodegenTestForNoArgGenerated extends AbstractFirBlackBoxCodegenTestForNoArg {
|
||||
public class FirLightTreeBlackBoxCodegenTestForNoArgGenerated extends AbstractFirLightTreeBlackBoxCodegenTestForNoArg {
|
||||
@Test
|
||||
public void testAllFilesPresentInBox() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/noarg/testData/box"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
+1
-1
@@ -19,7 +19,7 @@ import java.util.regex.Pattern;
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("plugins/noarg/testData/bytecodeListing")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class FirBytecodeListingTestForNoArgGenerated extends AbstractFirBytecodeListingTestForNoArg {
|
||||
public class FirLightTreeBytecodeListingTestForNoArgGenerated extends AbstractFirLightTreeBytecodeListingTestForNoArg {
|
||||
@Test
|
||||
public void testAllFilesPresentInBytecodeListing() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/noarg/testData/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), TargetBackend.JVM_IR, true);
|
||||
+1
-1
@@ -18,7 +18,7 @@ import java.util.regex.Pattern;
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("plugins/noarg/testData/diagnostics")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class FirDiagnosticsTestForNoArgGenerated extends AbstractFirDiagnosticsTestForNoArg {
|
||||
public class FirPsiDiagnosticsTestForNoArgGenerated extends AbstractFirPsiDiagnosticsTestForNoArg {
|
||||
@Test
|
||||
public void testAllFilesPresentInDiagnostics() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/noarg/testData/diagnostics"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
Reference in New Issue
Block a user