JS IR: mute codegen box tests automatically

This commit is contained in:
Anton Bannykh
2018-06-07 14:17:45 +03:00
parent 7e1713af44
commit 96355e2732
2384 changed files with 2384 additions and 0 deletions
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun a(): IntArray? = null
fun b(): Nothing = throw Exception()
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun a(): String? = null
fun b(): Nothing = throw Exception()
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
// TODO: Enable when JS backend gets support of Java class library
// IGNORE_BACKEND: JS, NATIVE
fun ok(b: Boolean) = if (b) "OK" else "Fail"
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
open abstract class B {
fun foo(arg: Int = 239 + 1) : Int = arg
}
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun <T> T.toPrefixedString(prefix: String = "", suffix: String="") = prefix + this.toString() + suffix
fun box() : String {
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
class T4(
val c1: Boolean,
val c2: Boolean,
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
interface A {
fun bar2(arg: Int = 239) : Int
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
open abstract class B {
abstract fun foo2(arg: Int = 239) : Int
}
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
interface A {
fun foo(x: Int, y: Int = x + 20, z: Int = y * 2) = z
}
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
class A(val expected: Int) {
fun foo(x: Int, y: Int = x + 20, z: Int = y * 2) = z == expected
}
+1
View File
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun box(): String {
return justPrint(9.compareTo(4))
}
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
val foo1 = fun Any.(): String {
return "239" + this
}
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun Int.thisRef1() = fun () = this
fun Int.thisRef2() = fun (): Int {return this}
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun Any.foo1() : ()-> String {
return { "239" + this }
}
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS, NATIVE
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS, NATIVE
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS, NATIVE
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun box(): String {
val f = fun (s: String): String = s
val g = f as String.() -> String
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
class TestClass {
companion object {
inline operator fun <T> invoke(task: () -> T) = task()
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
class TestClass {
inline operator fun <T> invoke(task: () -> T) = task()
}
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS, NATIVE
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
//KT-3190 Compiler crash if function called 'invoke' calls a closure
// IGNORE_BACKEND: JS
// JS backend does not allow to implement Function{N} interfaces
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
//KT-3297 Calling the wrong function inside an extension method to the Function0 class
infix fun <R> Function0<R>.or(alt: () -> R): R {
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
//KT-3822 Compiler crashes when use invoke convention with `this` in class which extends Function0<T>
// IGNORE_BACKEND: JS
// JS backend does not allow to implement Function{N} interfaces
+1
View File
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
//KT-1038 Cannot compile lazy iterators
class YieldingIterator<T>(val yieldingFunction : ()->T?) : Iterator<T>
+1
View File
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS, NATIVE
+1
View File
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS, NATIVE
+1
View File
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
class A(
val i : Int,
val j : Int = i
+1
View File
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun foo(i: Int, j: Int = i) = j
fun box() = if (foo(1) == 1) "OK" else "fail"
+1
View File
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun foo(): Int {
val a = "test"
val b = "test"
+1
View File
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
class A {
fun get(vararg x: Int) = x.size
}
+1
View File
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun Any.with(operation : Any.() -> Any) = operation().toString()
val f = { a : Int -> }
+1
View File
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun box() : String {
val fps : Double = 1.toDouble()
var mspf : Long
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun IntRange.forEach(body : (Int) -> Unit) {
for(i in this) {
body(i)
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
import kotlin.test.assertEquals
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
import kotlin.test.assertEquals
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
import kotlin.test.assertEquals
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
import kotlin.test.assertEquals
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun box() : String {
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS, NATIVE
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun box(): String {
var s = ""
var foo = "O"
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun box(): String {
fun foo(x: String) = x
fun foo() = foo("K")
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun box(): String {
var s = ""
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun box(): String {
var s = ""
var foo = "K"
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun box(): String {
var s = ""
var foo = "O"
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun foo(): String {
fun bar(x: String, y: String = x): String {
return y