From 1a525125784c1b0088b24d1362562c8981553ac4 Mon Sep 17 00:00:00 2001 From: Ivan Kylchik Date: Thu, 28 Oct 2021 12:46:03 +0300 Subject: [PATCH] [JS TESTS] Restore AbstractIrCodegenWasmJsInteropJsTest in generator --- .../generators/tests/GenerateJsTests.kt | 4 ++ ...IrCodegenWasmJsInteropJsTestGenerated.java | 52 +++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrCodegenWasmJsInteropJsTestGenerated.java diff --git a/js/js.tests/test/org/jetbrains/kotlin/generators/tests/GenerateJsTests.kt b/js/js.tests/test/org/jetbrains/kotlin/generators/tests/GenerateJsTests.kt index 4352cf79c7c..f9b0e5e63a0 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/generators/tests/GenerateJsTests.kt +++ b/js/js.tests/test/org/jetbrains/kotlin/generators/tests/GenerateJsTests.kt @@ -96,6 +96,10 @@ fun main(args: Array) { ) } + testClass { + model("codegen/boxWasmJsInterop", targetBackend = TargetBackend.JS_IR) + } + testClass { model("codegen/boxWasmJsInterop", targetBackend = TargetBackend.WASM) } diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrCodegenWasmJsInteropJsTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrCodegenWasmJsInteropJsTestGenerated.java new file mode 100644 index 00000000000..d92027949f9 --- /dev/null +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrCodegenWasmJsInteropJsTestGenerated.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010-2021 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.util.KtTestUtil; +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/boxWasmJsInterop") +@TestDataPath("$PROJECT_ROOT") +@RunWith(JUnit3RunnerWithInners.class) +public class IrCodegenWasmJsInteropJsTestGenerated extends AbstractIrCodegenWasmJsInteropJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInBoxWasmJsInterop() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxWasmJsInterop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("externalTypeOperators.kt") + public void testExternalTypeOperators() throws Exception { + runTest("compiler/testData/codegen/boxWasmJsInterop/externalTypeOperators.kt"); + } + + @TestMetadata("externals.kt") + public void testExternals() throws Exception { + runTest("compiler/testData/codegen/boxWasmJsInterop/externals.kt"); + } + + @TestMetadata("jsExport.kt") + public void testJsExport() throws Exception { + runTest("compiler/testData/codegen/boxWasmJsInterop/jsExport.kt"); + } + + @TestMetadata("types.kt") + public void testTypes() throws Exception { + runTest("compiler/testData/codegen/boxWasmJsInterop/types.kt"); + } +}