From 4e11555c461e10f7aea178df4ae0175c2d5ff453 Mon Sep 17 00:00:00 2001 From: Anton Bannykh Date: Wed, 11 Apr 2018 21:27:24 +0300 Subject: [PATCH] JS: fix BasicIrBoxTest constructor & regenerate the tests --- .../kotlin/js/test/BasicIrBoxTest.kt | 2 +- ...LegacyPrimitiveArraysBoxTestGenerated.java | 51 ++++++++++++++++--- 2 files changed, 44 insertions(+), 9 deletions(-) diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicIrBoxTest.kt b/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicIrBoxTest.kt index 3e3a2aca660..7384d184e34 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicIrBoxTest.kt +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicIrBoxTest.kt @@ -18,7 +18,7 @@ abstract class BasicIrBoxTest( pathToRootOutputDir: String = BasicBoxTest.TEST_DATA_DIR_PATH, generateSourceMap: Boolean = false, generateNodeJsRunner: Boolean = false -) : BasicBoxTest(pathToTestDir, testGroupOutputDirPrefix, pathToRootOutputDir, generateSourceMap, generateNodeJsRunner) { +) : BasicBoxTest(pathToTestDir, testGroupOutputDirPrefix, pathToRootOutputDir, true, generateSourceMap, generateNodeJsRunner) { override var skipMinification = true diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsLegacyPrimitiveArraysBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsLegacyPrimitiveArraysBoxTestGenerated.java index 589db40d6f3..5d3ad4d376c 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsLegacyPrimitiveArraysBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsLegacyPrimitiveArraysBoxTestGenerated.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license * that can be found in the license/LICENSE.txt file. */ @@ -58,37 +58,52 @@ public class JsLegacyPrimitiveArraysBoxTestGenerated extends AbstractJsLegacyPri @TestMetadata("arraysAreCloneable.kt") public void testArraysAreCloneable() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arraysAreCloneable.kt"); + if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { + doTest(fileName); + return; + } try { doTest(fileName); } catch (Throwable ignore) { + ignore.printStackTrace(); return; } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that."); + throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); } @TestMetadata("cloneArray.kt") public void testCloneArray() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/cloneArray.kt"); + if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { + doTest(fileName); + return; + } try { doTest(fileName); } catch (Throwable ignore) { + ignore.printStackTrace(); return; } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that."); + throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); } @TestMetadata("clonePrimitiveArrays.kt") public void testClonePrimitiveArrays() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/clonePrimitiveArrays.kt"); + if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { + doTest(fileName); + return; + } try { doTest(fileName); } catch (Throwable ignore) { + ignore.printStackTrace(); return; } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that."); + throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); } @TestMetadata("collectionAssignGetMultiIndex.kt") @@ -268,13 +283,18 @@ public class JsLegacyPrimitiveArraysBoxTestGenerated extends AbstractJsLegacyPri @TestMetadata("kt17134.kt") public void testKt17134() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt17134.kt"); + if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { + doTest(fileName); + return; + } try { doTest(fileName); } catch (Throwable ignore) { + ignore.printStackTrace(); return; } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that."); + throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); } @TestMetadata("kt238.kt") @@ -322,13 +342,18 @@ public class JsLegacyPrimitiveArraysBoxTestGenerated extends AbstractJsLegacyPri @TestMetadata("kt503.kt") public void testKt503() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt503.kt"); + if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { + doTest(fileName); + return; + } try { doTest(fileName); } catch (Throwable ignore) { + ignore.printStackTrace(); return; } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that."); + throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); } @TestMetadata("kt594.kt") @@ -340,13 +365,18 @@ public class JsLegacyPrimitiveArraysBoxTestGenerated extends AbstractJsLegacyPri @TestMetadata("kt602.kt") public void testKt602() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt602.kt"); + if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { + doTest(fileName); + return; + } try { doTest(fileName); } catch (Throwable ignore) { + ignore.printStackTrace(); return; } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that."); + throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); } @TestMetadata("kt7009.kt") @@ -364,13 +394,18 @@ public class JsLegacyPrimitiveArraysBoxTestGenerated extends AbstractJsLegacyPri @TestMetadata("kt7338.kt") public void testKt7338() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt7338.kt"); + if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { + doTest(fileName); + return; + } try { doTest(fileName); } catch (Throwable ignore) { + ignore.printStackTrace(); return; } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that."); + throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); } @TestMetadata("kt779.kt")