From 88b7f3086770974acc3d54942b1bedc309e8ac94 Mon Sep 17 00:00:00 2001 From: Sergej Jaskiewicz Date: Tue, 21 Mar 2023 19:29:44 +0100 Subject: [PATCH] [test] Use custom ignore directive for AbstractKlibJsTextTestCase tests We've muted some irText tests on JS in the previous commits because test expectations in some tests are different when targeting JS. AbstractKlibJsTextTestCase tests use a different logic: they compare the dump of the deserialized IR with the frontend-generated IR, not with the expectations in text files, thus muted tests weren't actually failing. Here we introduce a temporary fix, namely a separate // IGNORE directive for klib tests. When klib tests are moved to the new test infrastructure, there will be no need to do this. --- .../funInterface/functionSupertype.kt | 2 +- .../backingField/backingFieldVisibility.kt | 2 + .../backingField/explicitBackingFieldType.kt | 3 + .../independentBackingFieldType.kt | 3 + .../backingField/propertyTypeNarrowing.kt | 3 + .../generators/GenerateJUnit3CompilerTests.kt | 23 ++++--- .../klib/KlibIrTextTestCaseGenerated.java | 67 +++++++++---------- .../klib/KlibJsIrTextTestCaseGenerated.java | 8 +-- 8 files changed, 62 insertions(+), 49 deletions(-) diff --git a/compiler/testData/ir/irText/expressions/funInterface/functionSupertype.kt b/compiler/testData/ir/irText/expressions/funInterface/functionSupertype.kt index 92850216bba..c948709aff9 100644 --- a/compiler/testData/ir/irText/expressions/funInterface/functionSupertype.kt +++ b/compiler/testData/ir/irText/expressions/funInterface/functionSupertype.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: JS_IR +// DONT_TARGET_EXACT_BACKEND: JS_IR fun interface Foo : () -> Int diff --git a/compiler/testData/ir/irText/properties/backingField/backingFieldVisibility.kt b/compiler/testData/ir/irText/properties/backingField/backingFieldVisibility.kt index 33c7114ed65..3f2bc460342 100644 --- a/compiler/testData/ir/irText/properties/backingField/backingFieldVisibility.kt +++ b/compiler/testData/ir/irText/properties/backingField/backingFieldVisibility.kt @@ -1,6 +1,8 @@ // TARGET_FRONTEND: FIR // FIR_IDENTICAL +// IGNORE_BACKEND_KLIB: JS_IR + class A { val a: Number private field = 1 diff --git a/compiler/testData/ir/irText/properties/backingField/explicitBackingFieldType.kt b/compiler/testData/ir/irText/properties/backingField/explicitBackingFieldType.kt index 0071433edfe..9057dccf678 100644 --- a/compiler/testData/ir/irText/properties/backingField/explicitBackingFieldType.kt +++ b/compiler/testData/ir/irText/properties/backingField/explicitBackingFieldType.kt @@ -1,5 +1,8 @@ // TARGET_FRONTEND: FIR // FIR_IDENTICAL + +// IGNORE_BACKEND_KLIB: JS_IR + class A { val a = 20 diff --git a/compiler/testData/ir/irText/properties/backingField/independentBackingFieldType.kt b/compiler/testData/ir/irText/properties/backingField/independentBackingFieldType.kt index 8a7f462c3a9..1141394b7a2 100644 --- a/compiler/testData/ir/irText/properties/backingField/independentBackingFieldType.kt +++ b/compiler/testData/ir/irText/properties/backingField/independentBackingFieldType.kt @@ -1,5 +1,8 @@ // TARGET_FRONTEND: FIR // FIR_IDENTICAL + +// IGNORE_BACKEND_KLIB: JS_IR + class A { var it: Int field = 3.14 diff --git a/compiler/testData/ir/irText/properties/backingField/propertyTypeNarrowing.kt b/compiler/testData/ir/irText/properties/backingField/propertyTypeNarrowing.kt index b4882d6ab6f..08f6893a7e4 100644 --- a/compiler/testData/ir/irText/properties/backingField/propertyTypeNarrowing.kt +++ b/compiler/testData/ir/irText/properties/backingField/propertyTypeNarrowing.kt @@ -1,5 +1,8 @@ // TARGET_FRONTEND: FIR // FIR_IDENTICAL + +// IGNORE_BACKEND_KLIB: JS_IR + class A { val it: Number field = 4 diff --git a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit3CompilerTests.kt b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit3CompilerTests.kt index 7442697af0f..47e674444d2 100644 --- a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit3CompilerTests.kt +++ b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit3CompilerTests.kt @@ -115,14 +115,6 @@ fun generateJUnit3CompilerTests(args: Array) { model("codegen/customScript", pattern = "^(.*)$") } - testClass { - model("ir/irText/js", pattern = "^(.+)\\.kt\$", targetBackend = TargetBackend.JS_IR) - } - - testClass { - model("ir/irText", pattern = "^(.+)\\.kt\$", targetBackend = TargetBackend.JS_IR) - } - testClass { model("ir/irCfg") } @@ -392,6 +384,21 @@ fun generateJUnit3CompilerTests(args: Array) { } } + testGroup( + testsRoot = "compiler/tests-gen", + testDataRoot = "compiler/testData", + testRunnerMethodName = "runTestWithCustomIgnoreDirective", // FIXME: This is a temporary hack to smooth the transition to the new test infrastructure + additionalRunnerArguments = listOf("\"// IGNORE_BACKEND_KLIB: \"") + ) { + testClass { + model("ir/irText/js", pattern = "^(.+)\\.kt\$", targetBackend = TargetBackend.JS_IR) + } + + testClass { + model("ir/irText", pattern = "^(.+)\\.kt\$", targetBackend = TargetBackend.JS_IR) + } + } + testGroup("compiler/fir/raw-fir/psi2fir/tests-gen", "compiler/fir/raw-fir/psi2fir/testData") { testClass { model("rawBuilder", testMethod = "doRawFirTest") diff --git a/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java index 1eb754e22e3..ade29445baa 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java @@ -23,7 +23,7 @@ import java.util.regex.Pattern; @RunWith(JUnit3RunnerWithInners.class) public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInIrText() throws Exception { @@ -35,7 +35,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class Classes extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } @TestMetadata("47424.kt") @@ -247,7 +247,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class DataClasses extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInDataClasses() throws Exception { @@ -301,7 +301,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class Declarations extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInDeclarations() throws Exception { @@ -433,7 +433,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInAnnotations() throws Exception { @@ -611,7 +611,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class ContextReceivers extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInContextReceivers() throws Exception { @@ -688,7 +688,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class FromKEEP extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInFromKEEP() throws Exception { @@ -702,7 +702,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class JvmRecord extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInJvmRecord() throws Exception { @@ -715,7 +715,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class Multiplatform extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInMultiplatform() throws Exception { @@ -748,7 +748,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class Parameters extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInParameters() throws Exception { @@ -826,7 +826,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class ProvideDelegate extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInProvideDelegate() throws Exception { @@ -870,7 +870,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class Errors extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInErrors() throws Exception { @@ -893,7 +893,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class Expressions extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInExpressions() throws Exception { @@ -1600,7 +1600,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class CallableReferences extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } @TestMetadata("adaptedExtensionFunctions.kt") @@ -1713,7 +1713,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class FloatingPointComparisons extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInFloatingPointComparisons() throws Exception { @@ -1781,7 +1781,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class FunInterface extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInFunInterface() throws Exception { @@ -1803,11 +1803,6 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { runTest("compiler/testData/ir/irText/expressions/funInterface/castFromAny.kt"); } - @TestMetadata("functionSupertype.kt") - public void testFunctionSupertype() throws Exception { - runTest("compiler/testData/ir/irText/expressions/funInterface/functionSupertype.kt"); - } - @TestMetadata("partialSam.kt") public void testPartialSam() throws Exception { runTest("compiler/testData/ir/irText/expressions/funInterface/partialSam.kt"); @@ -1839,7 +1834,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class Sam extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInSam() throws Exception { @@ -1853,7 +1848,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class FirProblems extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInFirProblems() throws Exception { @@ -2016,7 +2011,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class Js extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInJs() throws Exception { @@ -2028,7 +2023,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class Dynamic extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInDynamic() throws Exception { @@ -2151,7 +2146,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class External extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInExternal() throws Exception { @@ -2169,7 +2164,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class Native extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInNative() throws Exception { @@ -2188,7 +2183,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class Lambdas extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInLambdas() throws Exception { @@ -2241,7 +2236,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class Properties extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInProperties() throws Exception { @@ -2253,7 +2248,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class BackingField extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInBackingField() throws Exception { @@ -2287,7 +2282,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class Regressions extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInRegressions() throws Exception { @@ -2325,7 +2320,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class Singletons extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInSingletons() throws Exception { @@ -2353,7 +2348,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class Stubs extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInStubs() throws Exception { @@ -2381,7 +2376,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class Types extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } @TestMetadata("abbreviatedTypes.kt") @@ -2523,7 +2518,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class NullChecks extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInNullChecks() throws Exception { @@ -2535,7 +2530,7 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { @RunWith(JUnit3RunnerWithInners.class) public static class NullCheckOnLambdaResult extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInNullCheckOnLambdaResult() throws Exception { diff --git a/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibJsIrTextTestCaseGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibJsIrTextTestCaseGenerated.java index eeb14f3962f..161d5b744af 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibJsIrTextTestCaseGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibJsIrTextTestCaseGenerated.java @@ -23,7 +23,7 @@ import java.util.regex.Pattern; @RunWith(JUnit3RunnerWithInners.class) public class KlibJsIrTextTestCaseGenerated extends AbstractKlibJsIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInJs() throws Exception { @@ -35,7 +35,7 @@ public class KlibJsIrTextTestCaseGenerated extends AbstractKlibJsIrTextTestCase @RunWith(JUnit3RunnerWithInners.class) public static class Dynamic extends AbstractKlibJsIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInDynamic() throws Exception { @@ -158,7 +158,7 @@ public class KlibJsIrTextTestCaseGenerated extends AbstractKlibJsIrTextTestCase @RunWith(JUnit3RunnerWithInners.class) public static class External extends AbstractKlibJsIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInExternal() throws Exception { @@ -176,7 +176,7 @@ public class KlibJsIrTextTestCaseGenerated extends AbstractKlibJsIrTextTestCase @RunWith(JUnit3RunnerWithInners.class) public static class Native extends AbstractKlibJsIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); } public void testAllFilesPresentInNative() throws Exception {