[PL][tests] Add JS K2 ABI partial linkage tests

This commit is contained in:
Dmitriy Dolovov
2023-03-28 19:32:44 +02:00
committed by Space Team
parent 5f1c09cc24
commit bcee270265
3 changed files with 276 additions and 65 deletions
@@ -0,0 +1,132 @@
/*
* Copyright 2010-2023 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;
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.GenerateJsTestsKt}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("compiler/testData/klibABI")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public class FirJsPartialLinkageNoICTestCaseGenerated extends AbstractFirJsPartialLinkageNoICTestCase {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath);
}
@TestMetadata("addEnumEntry")
public void testAddEnumEntry() throws Exception {
runTest("compiler/testData/klibABI/addEnumEntry/");
}
@TestMetadata("addSealedSubclass")
public void testAddSealedSubclass() throws Exception {
runTest("compiler/testData/klibABI/addSealedSubclass/");
}
public void testAllFilesPresentInKlibABI() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/klibABI"), Pattern.compile("^([^_](.+))$"), null, TargetBackend.JS_IR, false);
}
@TestMetadata("changeClassVisibility")
public void testChangeClassVisibility() throws Exception {
runTest("compiler/testData/klibABI/changeClassVisibility/");
}
@TestMetadata("changeFunctionVisibility")
public void testChangeFunctionVisibility() throws Exception {
runTest("compiler/testData/klibABI/changeFunctionVisibility/");
}
@TestMetadata("changePropertyVisibility")
public void testChangePropertyVisibility() throws Exception {
runTest("compiler/testData/klibABI/changePropertyVisibility/");
}
@TestMetadata("classTransformations")
public void testClassTransformations() throws Exception {
runTest("compiler/testData/klibABI/classTransformations/");
}
@TestMetadata("functionTransformations")
public void testFunctionTransformations() throws Exception {
runTest("compiler/testData/klibABI/functionTransformations/");
}
@TestMetadata("inheritanceIssues")
public void testInheritanceIssues() throws Exception {
runTest("compiler/testData/klibABI/inheritanceIssues/");
}
@TestMetadata("noNonImplementedCallableFalsePositives")
public void testNoNonImplementedCallableFalsePositives() throws Exception {
runTest("compiler/testData/klibABI/noNonImplementedCallableFalsePositives/");
}
@TestMetadata("nonAbstractCallableBecomesAbstract")
public void testNonAbstractCallableBecomesAbstract() throws Exception {
runTest("compiler/testData/klibABI/nonAbstractCallableBecomesAbstract/");
}
@TestMetadata("nonExhaustivenessOfWhenClause")
public void testNonExhaustivenessOfWhenClause() throws Exception {
runTest("compiler/testData/klibABI/nonExhaustivenessOfWhenClause/");
}
@TestMetadata("propertyTransformations")
public void testPropertyTransformations() throws Exception {
runTest("compiler/testData/klibABI/propertyTransformations/");
}
@TestMetadata("referencingUnusableDeclarations")
public void testReferencingUnusableDeclarations() throws Exception {
runTest("compiler/testData/klibABI/referencingUnusableDeclarations/");
}
@TestMetadata("removeAbstractCallableFromAbstractClassOrInterface")
public void testRemoveAbstractCallableFromAbstractClassOrInterface() throws Exception {
runTest("compiler/testData/klibABI/removeAbstractCallableFromAbstractClassOrInterface/");
}
@TestMetadata("removeCallable")
public void testRemoveCallable() throws Exception {
runTest("compiler/testData/klibABI/removeCallable/");
}
@TestMetadata("removeClass")
public void testRemoveClass() throws Exception {
runTest("compiler/testData/klibABI/removeClass/");
}
@TestMetadata("removeEnumEntry")
public void testRemoveEnumEntry() throws Exception {
runTest("compiler/testData/klibABI/removeEnumEntry/");
}
@TestMetadata("removeSealedSubclass")
public void testRemoveSealedSubclass() throws Exception {
runTest("compiler/testData/klibABI/removeSealedSubclass/");
}
@TestMetadata("replaceCallableReturnType")
public void testReplaceCallableReturnType() throws Exception {
runTest("compiler/testData/klibABI/replaceCallableReturnType/");
}
@TestMetadata("typeAliasChanges")
public void testTypeAliasChanges() throws Exception {
runTest("compiler/testData/klibABI/typeAliasChanges/");
}
}