[JS FIR Tests] Add multimodule order test for FIR
^KT-64451 Fixed
This commit is contained in:
committed by
Space Team
parent
b672e5c131
commit
561be747c1
@@ -175,6 +175,10 @@ fun main(args: Array<String>) {
|
||||
testClass<AbstractFirSourceMapGenerationSmokeTest> {
|
||||
model("sourcemap/")
|
||||
}
|
||||
|
||||
testClass<AbstractFirMultiModuleOrderTest> {
|
||||
model("multiModuleOrder/")
|
||||
}
|
||||
}
|
||||
|
||||
testGroup("js/js.tests/tests-gen", "compiler/testData", testRunnerMethodName = "runTest0") {
|
||||
|
||||
@@ -7,6 +7,7 @@ import org.jetbrains.kotlin.js.test.converters.JsIrBackendFacade
|
||||
import org.jetbrains.kotlin.js.test.converters.incremental.RecompileModuleJsIrBackendFacade
|
||||
import org.jetbrains.kotlin.js.test.handlers.JsDebugRunner
|
||||
import org.jetbrains.kotlin.js.test.handlers.JsIrRecompiledArtifactsIdentityHandler
|
||||
import org.jetbrains.kotlin.js.test.handlers.JsWrongModuleHandler
|
||||
import org.jetbrains.kotlin.js.test.handlers.createFirJsLineNumberHandler
|
||||
import org.jetbrains.kotlin.js.test.ir.AbstractJsIrTest
|
||||
import org.jetbrains.kotlin.parsing.parseBoolean
|
||||
@@ -179,6 +180,22 @@ open class AbstractFirSourceMapGenerationSmokeTest : AbstractFirJsTest(
|
||||
}
|
||||
}
|
||||
|
||||
open class AbstractFirMultiModuleOrderTest : AbstractFirJsTest(
|
||||
pathToTestDir = "${JsEnvironmentConfigurator.TEST_DATA_DIR_PATH}/multiModuleOrder/",
|
||||
testGroupOutputDirPrefix = "firMultiModuleOrder/"
|
||||
) {
|
||||
override fun configure(builder: TestConfigurationBuilder) {
|
||||
super.configure(builder)
|
||||
with(builder) {
|
||||
configureJsArtifactsHandlersStep {
|
||||
useHandlers(
|
||||
::JsWrongModuleHandler
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
open class AbstractFirJsSteppingTest : AbstractFirJsTest(
|
||||
pathToTestDir = "compiler/testData/debug/stepping/",
|
||||
testGroupOutputDirPrefix = "debug/firStepping/"
|
||||
|
||||
@@ -169,7 +169,7 @@ open class AbstractSourceMapGenerationSmokeTest : AbstractJsIrTest(
|
||||
|
||||
open class AbstractMultiModuleOrderTest : AbstractJsIrTest(
|
||||
pathToTestDir = "${JsEnvironmentConfigurator.TEST_DATA_DIR_PATH}/multiModuleOrder/",
|
||||
testGroupOutputDirPrefix = "multiModuleOrder/"
|
||||
testGroupOutputDirPrefix = "irMultiModuleOrder/"
|
||||
) {
|
||||
override fun configure(builder: TestConfigurationBuilder) {
|
||||
super.configure(builder)
|
||||
|
||||
Generated
+39
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.js.test.fir;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.util.KtTestUtil;
|
||||
import org.jetbrains.kotlin.test.TargetBackend;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.jupiter.api.Nested;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.GenerateJsTestsKt}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("js/js.translator/testData/multiModuleOrder")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class FirMultiModuleOrderTestGenerated extends AbstractFirMultiModuleOrderTest {
|
||||
@Test
|
||||
public void testAllFilesPresentInMultiModuleOrder() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/multiModuleOrder"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("plain.kt")
|
||||
public void testPlain() throws Exception {
|
||||
runTest("js/js.translator/testData/multiModuleOrder/plain.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("umd.kt")
|
||||
public void testUmd() throws Exception {
|
||||
runTest("js/js.translator/testData/multiModuleOrder/umd.kt");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user