[Test] Enable reporting errors from fronted to testdata of codegen tests
This commit is contained in:
committed by
TeamCityServer
parent
df60e7368a
commit
47e258ef6e
+2
-1
@@ -5,6 +5,7 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// DONT_RUN_GENERATED_CODE: JS
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_FIR_DIAGNOSTICS_DIFF
|
||||
|
||||
open class A {
|
||||
open fun foo(s: String = "OK") = s
|
||||
@@ -16,4 +17,4 @@ class B : A() {
|
||||
}
|
||||
}
|
||||
|
||||
fun box() = B().foo("FAIL")
|
||||
fun box() = B().foo("FAIL")
|
||||
|
||||
Vendored
+2
-1
@@ -1,5 +1,6 @@
|
||||
// !LANGUAGE: -ProperComputationOrderOfTailrecDefaultParameters
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_FIR_DIAGNOSTICS_DIFF
|
||||
|
||||
var counter = 0
|
||||
fun calc(counter: Int) = if (counter % 2 == 0) "K" else "O"
|
||||
@@ -13,4 +14,4 @@ fun calc(counter: Int) = if (counter % 2 == 0) "K" else "O"
|
||||
|
||||
fun box(): String {
|
||||
return test(0)
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -5,6 +5,7 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// DONT_RUN_GENERATED_CODE: JS
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_FIR_DIAGNOSTICS_DIFF
|
||||
|
||||
<!NO_TAIL_CALLS_FOUND!>tailrec fun noTails()<!> {
|
||||
// nothing here
|
||||
@@ -13,4 +14,4 @@
|
||||
fun box(): String {
|
||||
noTails()
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+2
-1
@@ -5,6 +5,7 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// DONT_RUN_GENERATED_CODE: JS
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_FIR_DIAGNOSTICS_DIFF
|
||||
|
||||
tailrec fun badTails(x : Int) : Int {
|
||||
if (x < 50 && x != 10 && x > 0) {
|
||||
@@ -22,4 +23,4 @@ tailrec fun badTails(x : Int) : Int {
|
||||
fun box(): String {
|
||||
badTails(1000000)
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -5,6 +5,7 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// DONT_RUN_GENERATED_CODE: JS
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_FIR_DIAGNOSTICS_DIFF
|
||||
|
||||
tailrec fun test(counter : Int) : Int? {
|
||||
if (counter < 0) return null
|
||||
@@ -15,4 +16,4 @@ tailrec fun test(counter : Int) : Int? {
|
||||
|
||||
fun box() : String =
|
||||
if (test(100000) == 777) "OK"
|
||||
else "FAIL"
|
||||
else "FAIL"
|
||||
|
||||
+1
@@ -7,6 +7,7 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// DONT_RUN_GENERATED_CODE: JS
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_FIR_DIAGNOSTICS_DIFF
|
||||
|
||||
class B {
|
||||
inner class C {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// DONT_RUN_GENERATED_CODE: JS
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_FIR_DIAGNOSTICS_DIFF
|
||||
|
||||
tailrec fun test(x : Int) : Int {
|
||||
var z = if (x > 3) 3 else x
|
||||
@@ -19,4 +20,4 @@ tailrec fun test(x : Int) : Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
fun box() : String = if (test(100000) == 1) "OK" else "FAIL"
|
||||
fun box() : String = if (test(100000) == 1) "OK" else "FAIL"
|
||||
|
||||
+2
-1
@@ -5,6 +5,7 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// DONT_RUN_GENERATED_CODE: JS
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_FIR_DIAGNOSTICS_DIFF
|
||||
|
||||
tailrec fun test(x : Int) : Int {
|
||||
if (x == 1) {
|
||||
@@ -20,4 +21,4 @@ tailrec fun test(x : Int) : Int {
|
||||
return -1
|
||||
}
|
||||
|
||||
fun box() : String = if (test(1000000) == -1) "OK" else "FAIL"
|
||||
fun box() : String = if (test(1000000) == -1) "OK" else "FAIL"
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// DONT_RUN_GENERATED_CODE: JS
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_FIR_DIAGNOSTICS_DIFF
|
||||
|
||||
<!NO_TAIL_CALLS_FOUND!>tailrec fun foo()<!> {
|
||||
bar {
|
||||
@@ -19,4 +20,4 @@ fun bar(a: Any) {}
|
||||
fun box(): String {
|
||||
foo()
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+2
-1
@@ -5,6 +5,7 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// DONT_RUN_GENERATED_CODE: JS
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_FIR_DIAGNOSTICS_DIFF
|
||||
|
||||
<!NO_TAIL_CALLS_FOUND!>tailrec fun foo()<!> {
|
||||
fun bar() {
|
||||
@@ -15,4 +16,4 @@
|
||||
fun box(): String {
|
||||
foo()
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -5,6 +5,7 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// DONT_RUN_GENERATED_CODE: JS
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_FIR_DIAGNOSTICS_DIFF
|
||||
|
||||
tailrec fun test(x : Int) : Int {
|
||||
return if (x == 1) {
|
||||
@@ -17,4 +18,4 @@ tailrec fun test(x : Int) : Int {
|
||||
}
|
||||
}
|
||||
|
||||
fun box() : String = if (test(1000000) == 1) "OK" else "FAIL"
|
||||
fun box() : String = if (test(1000000) == 1) "OK" else "FAIL"
|
||||
|
||||
+2
-1
@@ -5,6 +5,7 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// DONT_RUN_GENERATED_CODE: JS
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_FIR_DIAGNOSTICS_DIFF
|
||||
|
||||
<!NO_TAIL_CALLS_FOUND!>tailrec fun test(counter : Int) : Int<!> {
|
||||
if (counter == 0) return 0
|
||||
@@ -16,4 +17,4 @@
|
||||
}
|
||||
}
|
||||
|
||||
fun box() : String = if (test(3) == 0) "OK" else "FAIL"
|
||||
fun box() : String = if (test(3) == 0) "OK" else "FAIL"
|
||||
|
||||
+2
-1
@@ -5,6 +5,7 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// DONT_RUN_GENERATED_CODE: JS
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_FIR_DIAGNOSTICS_DIFF
|
||||
|
||||
<!NO_TAIL_CALLS_FOUND!>tailrec fun test(counter : Int) : Int<!> {
|
||||
if (counter == 0) return 0
|
||||
@@ -16,4 +17,4 @@
|
||||
}
|
||||
}
|
||||
|
||||
fun box() : String = if (test(3) == 0) "OK" else "FAIL"
|
||||
fun box() : String = if (test(3) == 0) "OK" else "FAIL"
|
||||
|
||||
+2
-1
@@ -5,6 +5,7 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// DONT_RUN_GENERATED_CODE: JS
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_FIR_DIAGNOSTICS_DIFF
|
||||
|
||||
<!NO_TAIL_CALLS_FOUND!>tailrec fun test(counter : Int) : Int<!> {
|
||||
if (counter == 0) return 0
|
||||
@@ -20,4 +21,4 @@
|
||||
return -1
|
||||
}
|
||||
|
||||
fun box() : String = if (test(3) == 0) "OK" else "FAIL"
|
||||
fun box() : String = if (test(3) == 0) "OK" else "FAIL"
|
||||
|
||||
+2
-1
@@ -5,6 +5,7 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// DONT_RUN_GENERATED_CODE: JS
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_FIR_DIAGNOSTICS_DIFF
|
||||
|
||||
<!NO_TAIL_CALLS_FOUND!>tailrec fun test(counter : Int) : Int<!> {
|
||||
if (counter == 0) return 0
|
||||
@@ -16,4 +17,4 @@
|
||||
}
|
||||
}
|
||||
|
||||
fun box() : String = if (test(3) == 0) "OK" else "FAIL"
|
||||
fun box() : String = if (test(3) == 0) "OK" else "FAIL"
|
||||
|
||||
+2
-1
@@ -5,6 +5,7 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// DONT_RUN_GENERATED_CODE: JS
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_FIR_DIAGNOSTICS_DIFF
|
||||
|
||||
tailrec fun test(x : Int) : Int =
|
||||
if (x == 1) {
|
||||
@@ -16,4 +17,4 @@ tailrec fun test(x : Int) : Int =
|
||||
0
|
||||
}
|
||||
|
||||
fun box() : String = if (test(1000000) == 1) "OK" else "FAIL"
|
||||
fun box() : String = if (test(1000000) == 1) "OK" else "FAIL"
|
||||
|
||||
+2
-1
@@ -5,6 +5,7 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// DONT_RUN_GENERATED_CODE: JS
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_FIR_DIAGNOSTICS_DIFF
|
||||
|
||||
tailrec fun test(x : Int) : Int {
|
||||
if (x == 10) {
|
||||
@@ -16,4 +17,4 @@ tailrec fun test(x : Int) : Int {
|
||||
return 0
|
||||
}
|
||||
|
||||
fun box() : String = if (test(1000000) == 1) "OK" else "FAIL"
|
||||
fun box() : String = if (test(1000000) == 1) "OK" else "FAIL"
|
||||
|
||||
+2
-1
@@ -5,6 +5,7 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// DONT_RUN_GENERATED_CODE: JS
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_FIR_DIAGNOSTICS_DIFF
|
||||
|
||||
tailrec fun test(x : Int) : Int {
|
||||
if (x == 0) {
|
||||
@@ -17,4 +18,4 @@ tailrec fun test(x : Int) : Int {
|
||||
}
|
||||
}
|
||||
|
||||
fun box() : String = if (test(1000000) == 1) "OK" else "FAIL"
|
||||
fun box() : String = if (test(1000000) == 1) "OK" else "FAIL"
|
||||
|
||||
Vendored
+2
-1
@@ -5,6 +5,7 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// DONT_RUN_GENERATED_CODE: JS
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_FIR_DIAGNOSTICS_DIFF
|
||||
|
||||
<!NO_TAIL_CALLS_FOUND!>tailrec fun test(go: Boolean) : Unit<!> {
|
||||
if (!go) return
|
||||
@@ -20,4 +21,4 @@
|
||||
fun box(): String {
|
||||
test(true)
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -5,6 +5,7 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// DONT_RUN_GENERATED_CODE: JS
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_FIR_DIAGNOSTICS_DIFF
|
||||
|
||||
class A {
|
||||
tailrec fun f1(c : Int) {
|
||||
@@ -28,4 +29,4 @@ fun box() : String {
|
||||
A().f1(1000000)
|
||||
A().f2(1000000)
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -5,6 +5,7 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// DONT_RUN_GENERATED_CODE: JS
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_FIR_DIAGNOSTICS_DIFF
|
||||
|
||||
tailrec fun test(x : Int) : Unit {
|
||||
if (x == 1) {
|
||||
@@ -26,4 +27,4 @@ tailrec fun test(x : Int) : Unit {
|
||||
fun box() : String {
|
||||
test(1000000)
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -5,6 +5,7 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// DONT_RUN_GENERATED_CODE: JS
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_FIR_DIAGNOSTICS_DIFF
|
||||
|
||||
tailrec fun withWhen(counter : Int) : Int =
|
||||
when (counter) {
|
||||
@@ -13,4 +14,4 @@ tailrec fun withWhen(counter : Int) : Int =
|
||||
else -> withWhen(counter - 1)
|
||||
}
|
||||
|
||||
fun box() : String = if (withWhen(100000) == 1) "OK" else "FAIL"
|
||||
fun box() : String = if (withWhen(100000) == 1) "OK" else "FAIL"
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// DONT_RUN_GENERATED_CODE: JS
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_FIR_DIAGNOSTICS_DIFF
|
||||
|
||||
tailrec fun withWhen(counter : Int, d : Any) : Int =
|
||||
when (counter) {
|
||||
@@ -18,4 +19,4 @@ tailrec fun withWhen(counter : Int, d : Any) : Int =
|
||||
else -> withWhen(counter - 1, "else")
|
||||
}
|
||||
|
||||
fun box() : String = if (withWhen(100000, "test") == 1) "OK" else "FAIL"
|
||||
fun box() : String = if (withWhen(100000, "test") == 1) "OK" else "FAIL"
|
||||
|
||||
+2
-1
@@ -5,6 +5,7 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// DONT_RUN_GENERATED_CODE: JS
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_FIR_DIAGNOSTICS_DIFF
|
||||
|
||||
tailrec fun withWhen2(counter : Int) : Int =
|
||||
when {
|
||||
@@ -14,4 +15,4 @@ tailrec fun withWhen2(counter : Int) : Int =
|
||||
else -> 1
|
||||
}
|
||||
|
||||
fun box() : String = if (withWhen2(100000) == 1) "OK" else "FAIL"
|
||||
fun box() : String = if (withWhen2(100000) == 1) "OK" else "FAIL"
|
||||
|
||||
Reference in New Issue
Block a user