From 41bd276814caf67e5429ca9446c411529b3a8205 Mon Sep 17 00:00:00 2001 From: Zalim Bashorov Date: Wed, 9 Nov 2016 21:50:03 +0300 Subject: [PATCH] Mute some new tests for JS and regenerate tests --- .../box/coroutines/beginWithException.kt | 3 ++ .../beginWithExceptionNoHandleException.kt | 3 ++ .../box/coroutines/noSuspensionPoints.kt | 3 ++ .../checkers/DiagnosticsTestGenerated.java | 2 +- .../inline/InlineTestGenerated.java | 6 ++-- .../semantics/JsCodegenBoxTestGenerated.java | 33 +++++++++++++++++++ 6 files changed, 46 insertions(+), 4 deletions(-) diff --git a/compiler/testData/codegen/box/coroutines/beginWithException.kt b/compiler/testData/codegen/box/coroutines/beginWithException.kt index 120b0effc37..940d33330dc 100644 --- a/compiler/testData/codegen/box/coroutines/beginWithException.kt +++ b/compiler/testData/codegen/box/coroutines/beginWithException.kt @@ -1,3 +1,6 @@ +// TODO: muted automatically, investigate should it be ran for JS or not +// IGNORE_BACKEND: JS + // WITH_RUNTIME class Controller { var exception: Throwable? = null diff --git a/compiler/testData/codegen/box/coroutines/beginWithExceptionNoHandleException.kt b/compiler/testData/codegen/box/coroutines/beginWithExceptionNoHandleException.kt index c7687613777..e1ba6521797 100644 --- a/compiler/testData/codegen/box/coroutines/beginWithExceptionNoHandleException.kt +++ b/compiler/testData/codegen/box/coroutines/beginWithExceptionNoHandleException.kt @@ -1,3 +1,6 @@ +// TODO: muted automatically, investigate should it be ran for JS or not +// IGNORE_BACKEND: JS + // WITH_RUNTIME class Controller { suspend fun suspendHere(x: Continuation) {} diff --git a/compiler/testData/codegen/box/coroutines/noSuspensionPoints.kt b/compiler/testData/codegen/box/coroutines/noSuspensionPoints.kt index 03da19b5897..cef97c96bd4 100644 --- a/compiler/testData/codegen/box/coroutines/noSuspensionPoints.kt +++ b/compiler/testData/codegen/box/coroutines/noSuspensionPoints.kt @@ -1,3 +1,6 @@ +// TODO: muted automatically, investigate should it be ran for JS or not +// IGNORE_BACKEND: JS + class Controller { var res = 0 operator fun handleResult(x: Int, y: Continuation) { diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java index bc63a07335e..1fa0968f327 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java @@ -21136,7 +21136,7 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @RunWith(JUnit3RunnerWithInners.class) public static class UnderscoresInNumericLiterals extends AbstractDiagnosticsTest { public void testAllFilesPresentInUnderscoresInNumericLiterals() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/underscoresInNumericLiterals"), Pattern.compile("^(.+)\\.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/underscoresInNumericLiterals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("illegalUnderscores.kt") diff --git a/idea/tests/org/jetbrains/kotlin/idea/refactoring/inline/InlineTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/refactoring/inline/InlineTestGenerated.java index 517d998be5b..5891709e15b 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/refactoring/inline/InlineTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/refactoring/inline/InlineTestGenerated.java @@ -41,7 +41,7 @@ public class InlineTestGenerated extends AbstractInlineTest { @RunWith(JUnit3RunnerWithInners.class) public static class Function extends AbstractInlineTest { public void testAllFilesPresentInFunction() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/inline/function"), Pattern.compile("^(\\w+)\\.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/inline/function"), Pattern.compile("^(\\w+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("EmptyFunction.kt") @@ -73,7 +73,7 @@ public class InlineTestGenerated extends AbstractInlineTest { @RunWith(JUnit3RunnerWithInners.class) public static class ExpressionBody extends AbstractInlineTest { public void testAllFilesPresentInExpressionBody() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/inline/function/expressionBody"), Pattern.compile("^(\\w+)\\.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/inline/function/expressionBody"), Pattern.compile("^(\\w+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ComplexArgumentNotUsed.kt") @@ -136,7 +136,7 @@ public class InlineTestGenerated extends AbstractInlineTest { } public void testAllFilesPresentInReturnAtEnd() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/inline/function/returnAtEnd"), Pattern.compile("^(\\w+)\\.kt$"), true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/inline/function/returnAtEnd"), Pattern.compile("^(\\w+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Bug1.kt") diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index 75fa3b9bcb4..8c320ec9c11 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -5375,6 +5375,28 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } + @TestMetadata("beginWithException.kt") + public void testBeginWithException() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/beginWithException.kt"); + try { + doTest(fileName); + throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that."); + } + catch (Throwable ignore) { + } + } + + @TestMetadata("beginWithExceptionNoHandleException.kt") + public void testBeginWithExceptionNoHandleException() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/beginWithExceptionNoHandleException.kt"); + try { + doTest(fileName); + throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that."); + } + catch (Throwable ignore) { + } + } + @TestMetadata("coercionToUnit.kt") public void testCoercionToUnit() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/coercionToUnit.kt"); @@ -5661,6 +5683,17 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { } } + @TestMetadata("noSuspensionPoints.kt") + public void testNoSuspensionPoints() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/noSuspensionPoints.kt"); + try { + doTest(fileName); + throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that."); + } + catch (Throwable ignore) { + } + } + @TestMetadata("nonLocalReturnFromInlineLambda.kt") public void testNonLocalReturnFromInlineLambda() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambda.kt");