FIR JS: rename test classes for uniformity

This commit is contained in:
Ilya Chernikov
2022-10-25 16:10:17 +02:00
parent c3197491a0
commit b28dd95621
4 changed files with 10 additions and 10 deletions
@@ -120,7 +120,7 @@ fun main(args: Array<String>) {
model("lineNumbers/") model("lineNumbers/")
} }
testClass<AbstractFirBoxJsTest> { testClass<AbstractFirJsBoxTest> {
model("box/", pattern = "^([^_](.+))\\.kt$") model("box/", pattern = "^([^_](.+))\\.kt$")
} }
@@ -190,7 +190,7 @@ fun main(args: Array<String>) {
model("codegen/boxInline") model("codegen/boxInline")
} }
testClass<AbstractFirCodegenWasmJsInteropJsTest> { testClass<AbstractFirJsCodegenWasmJsInteropTest> {
model("codegen/boxWasmJsInterop") model("codegen/boxWasmJsInterop")
} }
@@ -191,7 +191,7 @@ open class AbstractIrCodegenWasmJsInteropJsTest : AbstractJsIrTest(
testGroupOutputDirPrefix = "codegen/wasmJsInteropJs" testGroupOutputDirPrefix = "codegen/wasmJsInteropJs"
) )
open class AbstractFirJsTest( open class AbstractFirJsBlackBoxCodegenTest(
pathToTestDir: String = "${JsEnvironmentConfigurator.TEST_DATA_DIR_PATH}/box/", pathToTestDir: String = "${JsEnvironmentConfigurator.TEST_DATA_DIR_PATH}/box/",
testGroupOutputDirPrefix: String = "firBox/", testGroupOutputDirPrefix: String = "firBox/",
) : AbstractJsBlackBoxCodegenTestBase<FirOutputArtifact, IrBackendInput, BinaryArtifacts.KLib>( ) : AbstractJsBlackBoxCodegenTestBase<FirOutputArtifact, IrBackendInput, BinaryArtifacts.KLib>(
@@ -251,12 +251,12 @@ open class AbstractFirJsTest(
} }
} }
open class AbstractFirBoxJsTest : AbstractFirJsTest( open class AbstractFirJsBoxTest : AbstractFirJsBlackBoxCodegenTest(
pathToTestDir = "${JsEnvironmentConfigurator.TEST_DATA_DIR_PATH}/box/", pathToTestDir = "${JsEnvironmentConfigurator.TEST_DATA_DIR_PATH}/box/",
testGroupOutputDirPrefix = "irBox/" testGroupOutputDirPrefix = "irBox/"
) )
open class AbstractFirJsCodegenBoxTest : AbstractFirJsTest( open class AbstractFirJsCodegenBoxTest : AbstractFirJsBlackBoxCodegenTest(
pathToTestDir = "compiler/testData/codegen/box/", pathToTestDir = "compiler/testData/codegen/box/",
testGroupOutputDirPrefix = "codegen/irBox/" testGroupOutputDirPrefix = "codegen/irBox/"
) { ) {
@@ -272,12 +272,12 @@ open class AbstractFirJsCodegenBoxTest : AbstractFirJsTest(
} }
} }
open class AbstractFirJsCodegenBoxErrorTest : AbstractFirJsTest( open class AbstractFirJsCodegenBoxErrorTest : AbstractFirJsBlackBoxCodegenTest(
pathToTestDir = "compiler/testData/codegen/boxError/", pathToTestDir = "compiler/testData/codegen/boxError/",
testGroupOutputDirPrefix = "codegen/irBoxError/" testGroupOutputDirPrefix = "codegen/irBoxError/"
) )
open class AbstractFirJsCodegenInlineTest : AbstractFirJsTest( open class AbstractFirJsCodegenInlineTest : AbstractFirJsBlackBoxCodegenTest(
pathToTestDir = "compiler/testData/codegen/boxInline/", pathToTestDir = "compiler/testData/codegen/boxInline/",
testGroupOutputDirPrefix = "codegen/irBoxInline/" testGroupOutputDirPrefix = "codegen/irBoxInline/"
) )
@@ -315,7 +315,7 @@ open class AbstractFirJsCodegenInlineTest : AbstractFirJsTest(
// } // }
//} //}
open class AbstractFirCodegenWasmJsInteropJsTest : AbstractFirJsTest( open class AbstractFirJsCodegenWasmJsInteropTest : AbstractFirJsBlackBoxCodegenTest(
pathToTestDir = "compiler/testData/codegen/wasmJsInterop", pathToTestDir = "compiler/testData/codegen/wasmJsInterop",
testGroupOutputDirPrefix = "codegen/wasmJsInteropJs" testGroupOutputDirPrefix = "codegen/wasmJsInteropJs"
) )
@@ -19,7 +19,7 @@ import java.util.regex.Pattern;
@SuppressWarnings("all") @SuppressWarnings("all")
@TestMetadata("js/js.translator/testData/box") @TestMetadata("js/js.translator/testData/box")
@TestDataPath("$PROJECT_ROOT") @TestDataPath("$PROJECT_ROOT")
public class FirBoxJsTestGenerated extends AbstractFirBoxJsTest { public class FirJsBoxTestGenerated extends AbstractFirJsBoxTest {
@Test @Test
public void testAllFilesPresentInBox() throws Exception { public void testAllFilesPresentInBox() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true); KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
@@ -19,7 +19,7 @@ import java.util.regex.Pattern;
@SuppressWarnings("all") @SuppressWarnings("all")
@TestMetadata("compiler/testData/codegen/boxWasmJsInterop") @TestMetadata("compiler/testData/codegen/boxWasmJsInterop")
@TestDataPath("$PROJECT_ROOT") @TestDataPath("$PROJECT_ROOT")
public class FirCodegenWasmJsInteropJsTestGenerated extends AbstractFirCodegenWasmJsInteropJsTest { public class FirJsCodegenWasmJsInteropTestGenerated extends AbstractFirJsCodegenWasmJsInteropTest {
@Test @Test
public void testAllFilesPresentInBoxWasmJsInterop() throws Exception { public void testAllFilesPresentInBoxWasmJsInterop() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxWasmJsInterop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxWasmJsInterop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);