[Test] Convert IGNORE: NATIVE directives in box tests from A to C
^KT-59057 Merge-request: KT-MR-10747 Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
2da0e622c0
commit
3d60ed8874
+2
-6
@@ -1,9 +1,5 @@
|
||||
// IGNORE_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: IGNORED_IN_JS
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
// TARGET_BACKEND: JVM
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
|
||||
fun foo(x: Any) = x as Runnable
|
||||
|
||||
|
||||
+2
-6
@@ -1,9 +1,5 @@
|
||||
// IGNORE_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: IGNORED_IN_JS
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
// TARGET_BACKEND: JVM
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
|
||||
fun foo(x: Any) = x as? Runnable
|
||||
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
// IGNORE_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: IGNORED_IN_JS
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
|
||||
// WITH_REFLECT
|
||||
|
||||
fun fn0() {}
|
||||
@@ -15,10 +8,6 @@ val lambda1 = { x: Any -> } as (Any) -> Unit
|
||||
|
||||
fun Any.extFun() {}
|
||||
|
||||
var Any.extProp: String
|
||||
get() = "extProp"
|
||||
set(x: String) {}
|
||||
|
||||
class A {
|
||||
fun foo() {}
|
||||
}
|
||||
@@ -28,8 +17,6 @@ fun box(): String {
|
||||
val f1 = ::fn1 as Any
|
||||
|
||||
val ef = Any::extFun as Any
|
||||
val epg = Any::extProp.getter
|
||||
val eps = Any::extProp.setter
|
||||
|
||||
val afoo = A::foo
|
||||
|
||||
@@ -38,27 +25,19 @@ fun box(): String {
|
||||
|
||||
val localFun0 = ::local0 as Any
|
||||
val localFun1 = ::local1 as Any
|
||||
|
||||
assert(f0 is Function0<*>) { "Failed: f0 is Function0<*>" }
|
||||
assert(f1 is Function1<*, *>) { "Failed: f1 is Function1<*, *>" }
|
||||
assert(f0 !is Function1<*, *>) { "Failed: f0 !is Function1<*, *>" }
|
||||
assert(f1 !is Function0<*>) { "Failed: f1 !is Function0<*>" }
|
||||
|
||||
assert(lambda0 is Function0<*>) { "Failed: lambda0 is Function0<*>" }
|
||||
assert(lambda1 is Function1<*, *>) { "Failed: lambda1 is Function1<*, *>" }
|
||||
assert(lambda0 !is Function1<*, *>) { "Failed: lambda0 !is Function1<*, *>" }
|
||||
assert(lambda1 !is Function0<*>) { "Failed: lambda1 !is Function0<*>" }
|
||||
if (f0 !is Function0<*>) return "Failed: f0 is Function0<*>"
|
||||
if (f1 !is Function1<*, *>) return "Failed: f1 is Function1<*, *>"
|
||||
|
||||
assert(localFun0 is Function0<*>) { "Failed: localFun0 is Function0<*>" }
|
||||
assert(localFun1 is Function1<*, *>) { "Failed: localFun1 is Function1<*, *>" }
|
||||
assert(localFun0 !is Function1<*, *>) { "Failed: localFun0 !is Function1<*, *>" }
|
||||
assert(localFun1 !is Function0<*>) { "Failed: localFun1 !is Function0<*>" }
|
||||
if (lambda0 !is Function0<*>) return "Failed: lambda0 is Function0<*>"
|
||||
if (lambda1 !is Function1<*, *>) return "Failed: lambda1 is Function1<*, *>"
|
||||
|
||||
assert(ef is Function1<*, *>) { "Failed: ef is Function1<*, *>" }
|
||||
assert(epg is Function1<*, *>) { "Failed: epg is Function1<*, *>"}
|
||||
assert(eps is Function2<*, *, *>) { "Failed: eps is Function2<*, *, *>"}
|
||||
if (localFun0 !is Function0<*>) return "Failed: localFun0 is Function0<*>"
|
||||
if (localFun1 !is Function1<*, *>) return "Failed: localFun1 is Function1<*, *>"
|
||||
|
||||
assert(afoo is Function1<*, *>) { "afoo is Function1<*, *>" }
|
||||
if (ef !is Function1<*, *>) return "Failed: ef is Function1<*, *>"
|
||||
|
||||
if (afoo !is Function1<*, *>) return "afoo is Function1<*, *>"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
// TARGET_BACKEND: JS
|
||||
// TARGET_BACKEND: JS_IR
|
||||
// TARGET_BACKEND: JS_IR_ES6
|
||||
// WITH_REFLECT
|
||||
|
||||
fun fn0() {}
|
||||
fun fn1(x: Any) {}
|
||||
|
||||
val lambda0 = {} as () -> Unit
|
||||
val lambda1 = { x: Any -> } as (Any) -> Unit
|
||||
|
||||
fun Any.extFun() {}
|
||||
|
||||
var Any.extProp: String
|
||||
get() = "extProp"
|
||||
set(x: String) {}
|
||||
|
||||
class A {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val f0 = ::fn0 as Any
|
||||
val f1 = ::fn1 as Any
|
||||
|
||||
val ef = Any::extFun as Any
|
||||
|
||||
val afoo = A::foo
|
||||
|
||||
fun local0() {}
|
||||
fun local1(x: Any) {}
|
||||
|
||||
val localFun0 = ::local0 as Any
|
||||
val localFun1 = ::local1 as Any
|
||||
|
||||
if (f0 !is Function1<*, *>) return "Failed: f0 is Function1<*, *>"
|
||||
if (f1 !is Function0<*>) return "Failed: f1 is Function0<*>"
|
||||
|
||||
if (lambda0 !is Function1<*, *>) return "Failed: lambda0 is Function1<*, *>"
|
||||
if (lambda1 !is Function0<*>) return "Failed: lambda1 is Function0<*>"
|
||||
|
||||
if (localFun0 !is Function1<*, *>) return "Failed: localFun0 is Function1<*, *>"
|
||||
if (localFun1 !is Function0<*>) return "Failed: localFun1 is Function0<*>"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
|
||||
// WITH_REFLECT
|
||||
|
||||
var Any.extProp: String
|
||||
get() = "extProp"
|
||||
set(x: String) {}
|
||||
|
||||
fun box(): String {
|
||||
val epg = Any::extProp.getter
|
||||
val eps = Any::extProp.setter
|
||||
|
||||
if (epg !is Function1<*, *>) return "Failed: epg is Function1<*, *>"
|
||||
if (eps !is Function2<*, *, *>) return "Failed: eps is Function2<*, *, *>"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
// DONT_TARGET_EXACT_BACKEND: JS
|
||||
// DONT_TARGET_EXACT_BACKEND: JS_IR
|
||||
// DONT_TARGET_EXACT_BACKEND: JS_IR_ES6
|
||||
// WITH_REFLECT
|
||||
|
||||
fun fn0() {}
|
||||
fun fn1(x: Any) {}
|
||||
|
||||
val lambda0 = {} as () -> Unit
|
||||
val lambda1 = { x: Any -> } as (Any) -> Unit
|
||||
|
||||
fun Any.extFun() {}
|
||||
|
||||
var Any.extProp: String
|
||||
get() = "extProp"
|
||||
set(x: String) {}
|
||||
|
||||
class A {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val f0 = ::fn0 as Any
|
||||
val f1 = ::fn1 as Any
|
||||
|
||||
val ef = Any::extFun as Any
|
||||
|
||||
val afoo = A::foo
|
||||
|
||||
fun local0() {}
|
||||
fun local1(x: Any) {}
|
||||
|
||||
val localFun0 = ::local0 as Any
|
||||
val localFun1 = ::local1 as Any
|
||||
|
||||
if (f0 is Function1<*, *>) return "Failed: f0 !is Function1<*, *>"
|
||||
if (f1 is Function0<*>) return "Failed: f1 !is Function0<*>"
|
||||
|
||||
if (lambda0 is Function1<*, *>) return "Failed: lambda0 !is Function1<*, *>"
|
||||
if (lambda1 is Function0<*>) "Failed: lambda1 !is Function0<*>"
|
||||
|
||||
if (localFun0 is Function1<*, *>) return "Failed: localFun0 !is Function1<*, *>"
|
||||
if (localFun1 is Function0<*>) return "Failed: localFun1 !is Function0<*>"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+2
-6
@@ -1,9 +1,5 @@
|
||||
// IGNORE_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: IGNORED_IN_JS
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
// TARGET_BACKEND: JVM
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
|
||||
fun foo(x: Any) = x is Runnable
|
||||
|
||||
|
||||
+2
-6
@@ -1,9 +1,5 @@
|
||||
// IGNORE_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: IGNORED_IN_JS
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
// TARGET_BACKEND: JVM
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
|
||||
fun foo(x: Any) = x !is Runnable
|
||||
|
||||
|
||||
Reference in New Issue
Block a user