Added multi-module test on inline functions
This commit is contained in:
@@ -134,5 +134,13 @@ fun main(args: Array<String>) {
|
||||
testClass<AbstractJsLegacyPrimitiveArraysBoxTest> {
|
||||
model("codegen/box/arrays", targetBackend = TargetBackend.JS)
|
||||
}
|
||||
|
||||
testClass<AbstractJsInlineMultiModuleTests> {
|
||||
model("codegen/boxInline/multiModule/", targetBackend = TargetBackend.JS)
|
||||
}
|
||||
|
||||
testClass<AbstractIrJsInlineMultiModuleTests> {
|
||||
model("codegen/boxInline/multiModule/", targetBackend = TargetBackend.JS_IR)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+36
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2010-2019 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.ir.semantics;
|
||||
|
||||
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;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/multiModule")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class IrJsInlineMultiModuleTestsGenerated extends AbstractIrJsInlineMultiModuleTests {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInMultiModule() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multiModule"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("tryCatchWithRecursiveInline.kt")
|
||||
public void testTryCatchWithRecursiveInline() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/multiModule/tryCatchWithRecursiveInline.kt");
|
||||
}
|
||||
}
|
||||
+3
-1
@@ -43,4 +43,6 @@ abstract class AbstractIrInlineDefaultValuesTests : BorrowedIrInlineTest("defaul
|
||||
|
||||
abstract class AbstractIrInlineSuspendTests : BorrowedIrInlineTest("suspend/")
|
||||
|
||||
abstract class AbstractIrJsInlineContractsTests : BorrowedIrInlineTest("contracts/")
|
||||
abstract class AbstractIrJsInlineContractsTests : BorrowedIrInlineTest("contracts/")
|
||||
|
||||
abstract class AbstractIrJsInlineMultiModuleTests : BorrowedIrInlineTest("multiModule/")
|
||||
Generated
+36
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2010-2019 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.semantics;
|
||||
|
||||
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;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/multiModule")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class JsInlineMultiModuleTestsGenerated extends AbstractJsInlineMultiModuleTests {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInMultiModule() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multiModule"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
|
||||
}
|
||||
|
||||
@TestMetadata("tryCatchWithRecursiveInline.kt")
|
||||
public void testTryCatchWithRecursiveInline() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/multiModule/tryCatchWithRecursiveInline.kt");
|
||||
}
|
||||
}
|
||||
+2
@@ -33,6 +33,8 @@ abstract class AbstractInlineSuspendTests : BorrowedInlineTest("suspend/")
|
||||
|
||||
abstract class AbstractJsInlineContractsTests : BorrowedInlineTest("contracts/")
|
||||
|
||||
abstract class AbstractJsInlineMultiModuleTests : BorrowedInlineTest("multiModule/")
|
||||
|
||||
abstract class AbstractBoxJsTest : BasicBoxTest(
|
||||
BasicBoxTest.TEST_DATA_DIR_PATH + "box/",
|
||||
"box/"
|
||||
|
||||
Reference in New Issue
Block a user