[JS IR] Introduce the GENERATE_INLINE_ANONYMOUS_FUNCTIONS feature flag
This commit is contained in:
@@ -79,7 +79,7 @@ fun main(args: Array<String>) {
|
||||
generateTestGroupSuiteWithJUnit5(args) {
|
||||
testGroup("js/js.tests/tests-gen", "js/js.translator/testData", testRunnerMethodName = "runTest0") {
|
||||
testClass<AbstractBoxJsTest> {
|
||||
model("box/", pattern = "^([^_](.+))\\.kt$")
|
||||
model("box/", pattern = "^([^_](.+))\\.kt$", excludeDirs = listOf("closure/inlineAnonymousFunctions"))
|
||||
}
|
||||
|
||||
testClass<AbstractSourceMapGenerationSmokeTest> {
|
||||
|
||||
@@ -65,6 +65,12 @@ abstract class AbstractJsIrTest(
|
||||
::JsIrRecompiledArtifactsIdentityHandler,
|
||||
)
|
||||
}
|
||||
|
||||
forTestsMatching("${JsEnvironmentConfigurator.TEST_DATA_DIR_PATH}/box/closure/inlineAnonymousFunctions/*") {
|
||||
defaultDirectives {
|
||||
+JsEnvironmentConfigurationDirectives.GENERATE_INLINE_ANONYMOUS_FUNCTIONS
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-8
@@ -22,7 +22,7 @@ import java.util.regex.Pattern;
|
||||
public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
||||
@Test
|
||||
public void testAllFilesPresentInBox() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS, true);
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS, true, "closure/inlineAnonymousFunctions");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@@ -347,7 +347,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
||||
public class Closure {
|
||||
@Test
|
||||
public void testAllFilesPresentInClosure() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box/closure"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS, true);
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box/closure"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS, true, "inlineAnonymousFunctions");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -356,12 +356,6 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
||||
runTest("js/js.translator/testData/box/closure/closureArrayListInstance.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("closureCodeSize.kt")
|
||||
public void testClosureCodeSize() throws Exception {
|
||||
runTest("js/js.translator/testData/box/closure/closureCodeSize.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("closureFunctionAsArgument.kt")
|
||||
public void testClosureFunctionAsArgument() throws Exception {
|
||||
|
||||
+52
-6
@@ -356,12 +356,6 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
||||
runTest("js/js.translator/testData/box/closure/closureArrayListInstance.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("closureCodeSize.kt")
|
||||
public void testClosureCodeSize() throws Exception {
|
||||
runTest("js/js.translator/testData/box/closure/closureCodeSize.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("closureFunctionAsArgument.kt")
|
||||
public void testClosureFunctionAsArgument() throws Exception {
|
||||
@@ -631,6 +625,58 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
||||
public void testWrappedVariableInExtensionFun() throws Exception {
|
||||
runTest("js/js.translator/testData/box/closure/wrappedVariableInExtensionFun.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/box/closure/inlineAnonymousFunctions")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class InlineAnonymousFunctions {
|
||||
@Test
|
||||
public void testAllFilesPresentInInlineAnonymousFunctions() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box/closure/inlineAnonymousFunctions"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("closureCodeSize.kt")
|
||||
public void testClosureCodeSize() throws Exception {
|
||||
runTest("js/js.translator/testData/box/closure/inlineAnonymousFunctions/closureCodeSize.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("closureInWithInsideWith.kt")
|
||||
public void testClosureInWithInsideWith() throws Exception {
|
||||
runTest("js/js.translator/testData/box/closure/inlineAnonymousFunctions/closureInWithInsideWith.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inlineChain.kt")
|
||||
public void testInlineChain() throws Exception {
|
||||
runTest("js/js.translator/testData/box/closure/inlineAnonymousFunctions/inlineChain.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lambdaChain.kt")
|
||||
public void testLambdaChain() throws Exception {
|
||||
runTest("js/js.translator/testData/box/closure/inlineAnonymousFunctions/lambdaChain.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lambdaParameters.kt")
|
||||
public void testLambdaParameters() throws Exception {
|
||||
runTest("js/js.translator/testData/box/closure/inlineAnonymousFunctions/lambdaParameters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("localParameterInCallback.kt")
|
||||
public void testLocalParameterInCallback() throws Exception {
|
||||
runTest("js/js.translator/testData/box/closure/inlineAnonymousFunctions/localParameterInCallback.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("twiceRegeneratedAnonymousObject.kt")
|
||||
public void testTwiceRegeneratedAnonymousObject() throws Exception {
|
||||
runTest("js/js.translator/testData/box/closure/inlineAnonymousFunctions/twiceRegeneratedAnonymousObject.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
|
||||
Reference in New Issue
Block a user