Mute without checks all diagnostic tests for tailrec since it's not supported in JS yet and it takes too much time when muted with checks

This commit is contained in:
Zalim Bashorov
2016-11-15 18:01:23 +03:00
committed by Zalim Bashorov
parent bde9f99d7c
commit eda8749b91
38 changed files with 117 additions and 241 deletions
@@ -1,3 +1,5 @@
// IGNORE_BACKEND_WITHOUT_CHECK: JS
tailrec fun test(x : Int = 0, e : Any = "a") { tailrec fun test(x : Int = 0, e : Any = "a") {
if (!e.equals("a")) { if (!e.equals("a")) {
throw IllegalArgumentException() throw IllegalArgumentException()
@@ -1,5 +1,5 @@
// TODO: muted automatically, investigate should it be ran for JS or not // TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS // IGNORE_BACKEND_WITHOUT_CHECK: JS
open class A { open class A {
open fun foo(s: String = "OK") = s open fun foo(s: String = "OK") = s
@@ -1,4 +1,7 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER // !DIAGNOSTICS: -UNUSED_PARAMETER
// IGNORE_BACKEND_WITHOUT_CHECK: JS
tailrec fun Int.foo(x: Int) { tailrec fun Int.foo(x: Int) {
if (x == 0) return if (x == 0) return
return 1.foo(x - 1) return 1.foo(x - 1)
@@ -1,5 +1,5 @@
// TODO: muted automatically, investigate should it be ran for JS or not // TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS // IGNORE_BACKEND_WITHOUT_CHECK: JS
<!NO_TAIL_CALLS_FOUND!>tailrec fun noTails()<!> { <!NO_TAIL_CALLS_FOUND!>tailrec fun noTails()<!> {
// nothing here // nothing here
@@ -1,5 +1,5 @@
// TODO: muted automatically, investigate should it be ran for JS or not // TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS // IGNORE_BACKEND_WITHOUT_CHECK: JS
tailrec fun badTails(x : Int) : Int { tailrec fun badTails(x : Int) : Int {
if (x < 50 && x != 10 && x > 0) { if (x < 50 && x != 10 && x > 0) {
@@ -1,3 +1,5 @@
// IGNORE_BACKEND_WITHOUT_CHECK: JS
fun withoutAnnotation(x : Int) : Int { fun withoutAnnotation(x : Int) : Int {
if (x > 0) { if (x > 0) {
return 1 + withoutAnnotation(x - 1) return 1 + withoutAnnotation(x - 1)
@@ -1,3 +1,5 @@
// IGNORE_BACKEND_WITHOUT_CHECK: JS
tailrec infix fun Int.test(x : Int) : Int { tailrec infix fun Int.test(x : Int) : Int {
if (this > 1) { if (this > 1) {
return (this - 1) test x return (this - 1) test x
@@ -1,4 +1,7 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER // !DIAGNOSTICS: -UNUSED_PARAMETER
// IGNORE_BACKEND_WITHOUT_CHECK: JS
tailrec infix fun Int.foo(x: Int) { tailrec infix fun Int.foo(x: Int) {
if (x == 0) return if (x == 0) return
val xx = x - 1 val xx = x - 1
@@ -1,5 +1,5 @@
// TODO: muted automatically, investigate should it be ran for JS or not // TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS // IGNORE_BACKEND_WITHOUT_CHECK: JS
tailrec fun test(counter : Int) : Int? { tailrec fun test(counter : Int) : Int? {
if (counter < 0) return null if (counter < 0) return null
@@ -1,7 +1,7 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER // !DIAGNOSTICS: -UNUSED_PARAMETER
// TODO: muted automatically, investigate should it be ran for JS or not // TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS // IGNORE_BACKEND_WITHOUT_CHECK: JS
class B { class B {
inner class C { inner class C {
@@ -1,5 +1,5 @@
// TODO: muted automatically, investigate should it be ran for JS or not // TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS // IGNORE_BACKEND_WITHOUT_CHECK: JS
tailrec fun test(x : Int) : Int { tailrec fun test(x : Int) : Int {
var z = if (x > 3) 3 else x var z = if (x > 3) 3 else x
@@ -1,5 +1,5 @@
// TODO: muted automatically, investigate should it be ran for JS or not // TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS // IGNORE_BACKEND_WITHOUT_CHECK: JS
tailrec fun test(x : Int) : Int { tailrec fun test(x : Int) : Int {
if (x == 1) { if (x == 1) {
@@ -1,5 +1,5 @@
// TODO: muted automatically, investigate should it be ran for JS or not // TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS // IGNORE_BACKEND_WITHOUT_CHECK: JS
tailrec fun <T, A> Iterator<T>.foldl(acc : A, foldFunction : (e : T, acc : A) -> A) : A = tailrec fun <T, A> Iterator<T>.foldl(acc : A, foldFunction : (e : T, acc : A) -> A) : A =
if (!hasNext()) acc if (!hasNext()) acc
@@ -1,3 +1,5 @@
// IGNORE_BACKEND_WITHOUT_CHECK: JS
fun escapeChar(c : Char) : String? = when (c) { fun escapeChar(c : Char) : String? = when (c) {
'\\' -> "\\\\" '\\' -> "\\\\"
'\n' -> "\\n" '\n' -> "\\n"
@@ -1,3 +1,5 @@
// IGNORE_BACKEND_WITHOUT_CHECK: JS
tailrec fun String.repeat(num : Int, acc : StringBuilder = StringBuilder()) : String = tailrec fun String.repeat(num : Int, acc : StringBuilder = StringBuilder()) : String =
if (num == 0) acc.toString() if (num == 0) acc.toString()
else repeat(num - 1, acc.append(this)) else repeat(num - 1, acc.append(this))
@@ -1,7 +1,7 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER // !DIAGNOSTICS: -UNUSED_PARAMETER
// TODO: muted automatically, investigate should it be ran for JS or not // TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS // IGNORE_BACKEND_WITHOUT_CHECK: JS
<!NO_TAIL_CALLS_FOUND!>tailrec fun foo()<!> { <!NO_TAIL_CALLS_FOUND!>tailrec fun foo()<!> {
bar { bar {
@@ -1,5 +1,5 @@
// TODO: muted automatically, investigate should it be ran for JS or not // TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS // IGNORE_BACKEND_WITHOUT_CHECK: JS
<!NO_TAIL_CALLS_FOUND!>tailrec fun foo()<!> { <!NO_TAIL_CALLS_FOUND!>tailrec fun foo()<!> {
fun bar() { fun bar() {
@@ -1,3 +1,5 @@
// IGNORE_BACKEND_WITHOUT_CHECK: JS
fun test() { fun test() {
tailrec fun g3(counter : Int) { tailrec fun g3(counter : Int) {
if (counter > 0) { g3(counter - 1) } if (counter > 0) { g3(counter - 1) }
@@ -1,5 +1,5 @@
// TODO: muted automatically, investigate should it be ran for JS or not // TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS // IGNORE_BACKEND_WITHOUT_CHECK: JS
tailrec fun test(x : Int) : Int { tailrec fun test(x : Int) : Int {
return if (x == 1) { return if (x == 1) {
@@ -1,5 +1,5 @@
// TODO: muted automatically, investigate should it be ran for JS or not // TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS // IGNORE_BACKEND_WITHOUT_CHECK: JS
<!NO_TAIL_CALLS_FOUND!>tailrec fun test(counter : Int) : Int<!> { <!NO_TAIL_CALLS_FOUND!>tailrec fun test(counter : Int) : Int<!> {
if (counter == 0) return 0 if (counter == 0) return 0
@@ -1,5 +1,5 @@
// TODO: muted automatically, investigate should it be ran for JS or not // TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS // IGNORE_BACKEND_WITHOUT_CHECK: JS
<!NO_TAIL_CALLS_FOUND!>tailrec fun test(counter : Int) : Int<!> { <!NO_TAIL_CALLS_FOUND!>tailrec fun test(counter : Int) : Int<!> {
if (counter == 0) return 0 if (counter == 0) return 0
@@ -1,5 +1,5 @@
// TODO: muted automatically, investigate should it be ran for JS or not // TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS // IGNORE_BACKEND_WITHOUT_CHECK: JS
<!NO_TAIL_CALLS_FOUND!>tailrec fun test(counter : Int) : Int<!> { <!NO_TAIL_CALLS_FOUND!>tailrec fun test(counter : Int) : Int<!> {
if (counter == 0) return 0 if (counter == 0) return 0
@@ -1,3 +1,5 @@
// IGNORE_BACKEND_WITHOUT_CHECK: JS
tailrec fun foo(x: Int) { tailrec fun foo(x: Int) {
if (x == 0) return if (x == 0) return
(return foo(x - 1)) (return foo(x - 1))
@@ -1,5 +1,5 @@
// TODO: muted automatically, investigate should it be ran for JS or not // TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS // IGNORE_BACKEND_WITHOUT_CHECK: JS
<!NO_TAIL_CALLS_FOUND!>tailrec fun test(counter : Int) : Int<!> { <!NO_TAIL_CALLS_FOUND!>tailrec fun test(counter : Int) : Int<!> {
if (counter == 0) return 0 if (counter == 0) return 0
@@ -1,5 +1,5 @@
// TODO: muted automatically, investigate should it be ran for JS or not // TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS // IGNORE_BACKEND_WITHOUT_CHECK: JS
tailrec fun test(x : Int) : Int = tailrec fun test(x : Int) : Int =
if (x == 1) { if (x == 1) {
@@ -1,5 +1,5 @@
// TODO: muted automatically, investigate should it be ran for JS or not // TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS // IGNORE_BACKEND_WITHOUT_CHECK: JS
tailrec fun test(x : Int) : Int { tailrec fun test(x : Int) : Int {
if (x == 10) { if (x == 10) {
@@ -1,5 +1,5 @@
// TODO: muted automatically, investigate should it be ran for JS or not // TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS // IGNORE_BACKEND_WITHOUT_CHECK: JS
tailrec fun test(x : Int) : Int { tailrec fun test(x : Int) : Int {
if (x == 0) { if (x == 0) {
@@ -1,5 +1,5 @@
// TODO: muted automatically, investigate should it be ran for JS or not // TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS // IGNORE_BACKEND_WITHOUT_CHECK: JS
tailrec fun sum(x: Long, sum: Long): Long { tailrec fun sum(x: Long, sum: Long): Long {
if (x == 0.toLong()) return sum if (x == 0.toLong()) return sum
@@ -1,3 +1,5 @@
// IGNORE_BACKEND_WITHOUT_CHECK: JS
tailrec fun foo(x: Int) { tailrec fun foo(x: Int) {
return if (x > 0) { return if (x > 0) {
(foo(x - 1)) (foo(x - 1))
@@ -1,3 +1,5 @@
// IGNORE_BACKEND_WITHOUT_CHECK: JS
tailrec fun foo(x: Int) { tailrec fun foo(x: Int) {
if (x == 0) return if (x == 0) return
return (foo(x - 1)) return (foo(x - 1))
@@ -1,5 +1,5 @@
// TODO: muted automatically, investigate should it be ran for JS or not // TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS // IGNORE_BACKEND_WITHOUT_CHECK: JS
<!NO_TAIL_CALLS_FOUND!>tailrec fun test(go: Boolean) : Unit<!> { <!NO_TAIL_CALLS_FOUND!>tailrec fun test(go: Boolean) : Unit<!> {
if (!go) return if (!go) return
@@ -1,5 +1,5 @@
// TODO: muted automatically, investigate should it be ran for JS or not // TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS // IGNORE_BACKEND_WITHOUT_CHECK: JS
class A { class A {
tailrec fun f1(c : Int) { tailrec fun f1(c : Int) {
@@ -1,5 +1,5 @@
// TODO: muted automatically, investigate should it be ran for JS or not // TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS // IGNORE_BACKEND_WITHOUT_CHECK: JS
tailrec fun test(x : Int) : Unit { tailrec fun test(x : Int) : Unit {
if (x == 1) { if (x == 1) {
@@ -1,5 +1,5 @@
// TODO: muted automatically, investigate should it be ran for JS or not // TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS // IGNORE_BACKEND_WITHOUT_CHECK: JS
tailrec fun withWhen(counter : Int) : Int = tailrec fun withWhen(counter : Int) : Int =
when (counter) { when (counter) {
@@ -1,7 +1,7 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER // !DIAGNOSTICS: -UNUSED_PARAMETER
// TODO: muted automatically, investigate should it be ran for JS or not // TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS // IGNORE_BACKEND_WITHOUT_CHECK: JS
tailrec fun withWhen(counter : Int, d : Any) : Int = tailrec fun withWhen(counter : Int, d : Any) : Int =
when (counter) { when (counter) {
@@ -1,3 +1,5 @@
// IGNORE_BACKEND_WITHOUT_CHECK: JS
tailrec fun withWhen(counter : Int, d : Any) : Int = tailrec fun withWhen(counter : Int, d : Any) : Int =
if (counter == 0) { if (counter == 0) {
0 0
@@ -1,5 +1,5 @@
// TODO: muted automatically, investigate should it be ran for JS or not // TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS // IGNORE_BACKEND_WITHOUT_CHECK: JS
tailrec fun withWhen2(counter : Int) : Int = tailrec fun withWhen2(counter : Int) : Int =
when { when {
@@ -7595,380 +7595,230 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
@TestDataPath("$PROJECT_ROOT") @TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class TailRecursion extends AbstractJsCodegenBoxTest { public static class TailRecursion extends AbstractJsCodegenBoxTest {
public void testAllFilesPresentInTailRecursion() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/tailRecursion"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
}
@TestMetadata("defaultArgs.kt") @TestMetadata("defaultArgs.kt")
public void testDefaultArgs() throws Exception { public void ignoreDefaultArgs() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/defaultArgs.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/defaultArgs.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("defaultArgsOverridden.kt") @TestMetadata("defaultArgsOverridden.kt")
public void testDefaultArgsOverridden() throws Exception { public void ignoreDefaultArgsOverridden() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/defaultArgsOverridden.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/defaultArgsOverridden.kt");
try { doTest(fileName);
doTest(fileName);
}
catch (Throwable ignore) {
return;
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
} }
@TestMetadata("extensionTailCall.kt") @TestMetadata("extensionTailCall.kt")
public void testExtensionTailCall() throws Exception { public void ignoreExtensionTailCall() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/extensionTailCall.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/extensionTailCall.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("functionWithNoTails.kt") @TestMetadata("functionWithNoTails.kt")
public void testFunctionWithNoTails() throws Exception { public void ignoreFunctionWithNoTails() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithNoTails.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithNoTails.kt");
try { doTest(fileName);
doTest(fileName);
}
catch (Throwable ignore) {
return;
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
} }
@TestMetadata("functionWithNonTailRecursions.kt") @TestMetadata("functionWithNonTailRecursions.kt")
public void testFunctionWithNonTailRecursions() throws Exception { public void ignoreFunctionWithNonTailRecursions() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithNonTailRecursions.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithNonTailRecursions.kt");
try { doTest(fileName);
doTest(fileName);
}
catch (Throwable ignore) {
return;
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
} }
@TestMetadata("functionWithoutAnnotation.kt") @TestMetadata("functionWithoutAnnotation.kt")
public void testFunctionWithoutAnnotation() throws Exception { public void ignoreFunctionWithoutAnnotation() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithoutAnnotation.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithoutAnnotation.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("infixCall.kt") @TestMetadata("infixCall.kt")
public void testInfixCall() throws Exception { public void ignoreInfixCall() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixCall.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixCall.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("infixRecursiveCall.kt") @TestMetadata("infixRecursiveCall.kt")
public void testInfixRecursiveCall() throws Exception { public void ignoreInfixRecursiveCall() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixRecursiveCall.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixRecursiveCall.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("insideElvis.kt") @TestMetadata("insideElvis.kt")
public void testInsideElvis() throws Exception { public void ignoreInsideElvis() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/insideElvis.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/insideElvis.kt");
try { doTest(fileName);
doTest(fileName);
}
catch (Throwable ignore) {
return;
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
} }
@TestMetadata("labeledThisReferences.kt") @TestMetadata("labeledThisReferences.kt")
public void testLabeledThisReferences() throws Exception { public void ignoreLabeledThisReferences() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/labeledThisReferences.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/labeledThisReferences.kt");
try { doTest(fileName);
doTest(fileName);
}
catch (Throwable ignore) {
return;
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
} }
@TestMetadata("loops.kt") @TestMetadata("loops.kt")
public void testLoops() throws Exception { public void ignoreLoops() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/loops.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/loops.kt");
try { doTest(fileName);
doTest(fileName);
}
catch (Throwable ignore) {
return;
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
} }
@TestMetadata("multilevelBlocks.kt") @TestMetadata("multilevelBlocks.kt")
public void testMultilevelBlocks() throws Exception { public void ignoreMultilevelBlocks() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/multilevelBlocks.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/multilevelBlocks.kt");
try { doTest(fileName);
doTest(fileName);
}
catch (Throwable ignore) {
return;
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
} }
@TestMetadata("realIteratorFoldl.kt") @TestMetadata("realIteratorFoldl.kt")
public void testRealIteratorFoldl() throws Exception { public void ignoreRealIteratorFoldl() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realIteratorFoldl.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realIteratorFoldl.kt");
try { doTest(fileName);
doTest(fileName);
}
catch (Throwable ignore) {
return;
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
} }
@TestMetadata("realStringEscape.kt") @TestMetadata("realStringEscape.kt")
public void testRealStringEscape() throws Exception { public void ignoreRealStringEscape() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realStringEscape.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realStringEscape.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("realStringRepeat.kt") @TestMetadata("realStringRepeat.kt")
public void testRealStringRepeat() throws Exception { public void ignoreRealStringRepeat() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realStringRepeat.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realStringRepeat.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("recursiveCallInLambda.kt") @TestMetadata("recursiveCallInLambda.kt")
public void testRecursiveCallInLambda() throws Exception { public void ignoreRecursiveCallInLambda() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLambda.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLambda.kt");
try { doTest(fileName);
doTest(fileName);
}
catch (Throwable ignore) {
return;
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
} }
@TestMetadata("recursiveCallInLocalFunction.kt") @TestMetadata("recursiveCallInLocalFunction.kt")
public void testRecursiveCallInLocalFunction() throws Exception { public void ignoreRecursiveCallInLocalFunction() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLocalFunction.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLocalFunction.kt");
try { doTest(fileName);
doTest(fileName);
}
catch (Throwable ignore) {
return;
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
} }
@TestMetadata("recursiveInnerFunction.kt") @TestMetadata("recursiveInnerFunction.kt")
public void testRecursiveInnerFunction() throws Exception { public void ignoreRecursiveInnerFunction() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveInnerFunction.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveInnerFunction.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("returnIf.kt") @TestMetadata("returnIf.kt")
public void testReturnIf() throws Exception { public void ignoreReturnIf() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnIf.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnIf.kt");
try { doTest(fileName);
doTest(fileName);
}
catch (Throwable ignore) {
return;
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
} }
@TestMetadata("returnInCatch.kt") @TestMetadata("returnInCatch.kt")
public void testReturnInCatch() throws Exception { public void ignoreReturnInCatch() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInCatch.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInCatch.kt");
try { doTest(fileName);
doTest(fileName);
}
catch (Throwable ignore) {
return;
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
} }
@TestMetadata("returnInFinally.kt") @TestMetadata("returnInFinally.kt")
public void testReturnInFinally() throws Exception { public void ignoreReturnInFinally() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInFinally.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInFinally.kt");
try { doTest(fileName);
doTest(fileName);
}
catch (Throwable ignore) {
return;
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
} }
@TestMetadata("returnInIfInFinally.kt") @TestMetadata("returnInIfInFinally.kt")
public void testReturnInIfInFinally() throws Exception { public void ignoreReturnInIfInFinally() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInIfInFinally.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInIfInFinally.kt");
try { doTest(fileName);
doTest(fileName);
}
catch (Throwable ignore) {
return;
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
} }
@TestMetadata("returnInParentheses.kt") @TestMetadata("returnInParentheses.kt")
public void testReturnInParentheses() throws Exception { public void ignoreReturnInParentheses() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInParentheses.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInParentheses.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("returnInTry.kt") @TestMetadata("returnInTry.kt")
public void testReturnInTry() throws Exception { public void ignoreReturnInTry() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInTry.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInTry.kt");
try { doTest(fileName);
doTest(fileName);
}
catch (Throwable ignore) {
return;
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
} }
@TestMetadata("simpleBlock.kt") @TestMetadata("simpleBlock.kt")
public void testSimpleBlock() throws Exception { public void ignoreSimpleBlock() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleBlock.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleBlock.kt");
try { doTest(fileName);
doTest(fileName);
}
catch (Throwable ignore) {
return;
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
} }
@TestMetadata("simpleReturn.kt") @TestMetadata("simpleReturn.kt")
public void testSimpleReturn() throws Exception { public void ignoreSimpleReturn() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleReturn.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleReturn.kt");
try { doTest(fileName);
doTest(fileName);
}
catch (Throwable ignore) {
return;
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
} }
@TestMetadata("simpleReturnWithElse.kt") @TestMetadata("simpleReturnWithElse.kt")
public void testSimpleReturnWithElse() throws Exception { public void ignoreSimpleReturnWithElse() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleReturnWithElse.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleReturnWithElse.kt");
try { doTest(fileName);
doTest(fileName);
}
catch (Throwable ignore) {
return;
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
} }
@TestMetadata("sum.kt") @TestMetadata("sum.kt")
public void testSum() throws Exception { public void ignoreSum() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/sum.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/sum.kt");
try { doTest(fileName);
doTest(fileName);
}
catch (Throwable ignore) {
return;
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
} }
@TestMetadata("tailCallInBlockInParentheses.kt") @TestMetadata("tailCallInBlockInParentheses.kt")
public void testTailCallInBlockInParentheses() throws Exception { public void ignoreTailCallInBlockInParentheses() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInBlockInParentheses.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInBlockInParentheses.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("tailCallInParentheses.kt") @TestMetadata("tailCallInParentheses.kt")
public void testTailCallInParentheses() throws Exception { public void ignoreTailCallInParentheses() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInParentheses.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInParentheses.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("tailRecursionInFinally.kt") @TestMetadata("tailRecursionInFinally.kt")
public void testTailRecursionInFinally() throws Exception { public void ignoreTailRecursionInFinally() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailRecursionInFinally.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailRecursionInFinally.kt");
try { doTest(fileName);
doTest(fileName);
}
catch (Throwable ignore) {
return;
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
} }
@TestMetadata("thisReferences.kt") @TestMetadata("thisReferences.kt")
public void testThisReferences() throws Exception { public void ignoreThisReferences() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/thisReferences.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/thisReferences.kt");
try { doTest(fileName);
doTest(fileName);
}
catch (Throwable ignore) {
return;
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
} }
@TestMetadata("unitBlocks.kt") @TestMetadata("unitBlocks.kt")
public void testUnitBlocks() throws Exception { public void ignoreUnitBlocks() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/unitBlocks.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/unitBlocks.kt");
try { doTest(fileName);
doTest(fileName);
}
catch (Throwable ignore) {
return;
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
} }
@TestMetadata("whenWithCondition.kt") @TestMetadata("whenWithCondition.kt")
public void testWhenWithCondition() throws Exception { public void ignoreWhenWithCondition() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithCondition.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithCondition.kt");
try { doTest(fileName);
doTest(fileName);
}
catch (Throwable ignore) {
return;
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
} }
@TestMetadata("whenWithInRange.kt") @TestMetadata("whenWithInRange.kt")
public void testWhenWithInRange() throws Exception { public void ignoreWhenWithInRange() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithInRange.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithInRange.kt");
try { doTest(fileName);
doTest(fileName);
}
catch (Throwable ignore) {
return;
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
} }
@TestMetadata("whenWithIs.kt") @TestMetadata("whenWithIs.kt")
public void testWhenWithIs() throws Exception { public void ignoreWhenWithIs() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithIs.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithIs.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("whenWithoutCondition.kt") @TestMetadata("whenWithoutCondition.kt")
public void testWhenWithoutCondition() throws Exception { public void ignoreWhenWithoutCondition() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithoutCondition.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithoutCondition.kt");
try { doTest(fileName);
doTest(fileName); }
}
catch (Throwable ignore) { public void testAllFilesPresentInTailRecursion() throws Exception {
return; KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/tailRecursion"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
}
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
} }
} }
} }