JS: add more tests
This commit is contained in:
committed by
Anton Bannykh
parent
0579b52d6b
commit
cf9ad635e1
@@ -3,6 +3,7 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// NO_CHECK_LAMBDA_INLINING
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
suspend inline fun test1(c: () -> Unit) {
|
||||
c()
|
||||
|
||||
+6
-1
@@ -2,13 +2,18 @@
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
// IGNORE_BACKEND: JS
|
||||
import COROUTINES_PACKAGE.*
|
||||
import helpers.*
|
||||
|
||||
// Block is allowed to be called inside the body of owner inline function
|
||||
// Block is allowed to be called from nested classes/lambdas (as common crossinlines)
|
||||
|
||||
// Needed for JS compatibility
|
||||
interface Runnable {
|
||||
fun run(): Unit
|
||||
}
|
||||
|
||||
suspend inline fun test1(crossinline c: () -> Unit) {
|
||||
c()
|
||||
}
|
||||
|
||||
+6
-1
@@ -2,13 +2,18 @@
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
// IGNORE_BACKEND: JS
|
||||
import COROUTINES_PACKAGE.*
|
||||
import helpers.*
|
||||
|
||||
// Block is allowed to be called inside the body of owner inline function
|
||||
// Block is allowed to be called from nested classes/lambdas (as common crossinlines)
|
||||
|
||||
// Needed for JS compatibility
|
||||
interface Runnable {
|
||||
fun run(): Unit
|
||||
}
|
||||
|
||||
suspend inline fun test1(noinline c: () -> Unit) {
|
||||
c()
|
||||
}
|
||||
|
||||
@@ -3,12 +3,16 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// NO_CHECK_LAMBDA_INLINING
|
||||
|
||||
object Result {
|
||||
var a: String = ""
|
||||
var b: Int = 0
|
||||
}
|
||||
|
||||
// Needed for JS compatibility
|
||||
interface Runnable {
|
||||
fun run(): Unit
|
||||
}
|
||||
|
||||
suspend inline fun inlineMe(c: suspend () -> Unit) {
|
||||
var a = ""
|
||||
var b = 0
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
// SKIP_SOURCEMAP_REMAPPING
|
||||
import COROUTINES_PACKAGE.*
|
||||
import helpers.*
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
// SKIP_SOURCEMAP_REMAPPING
|
||||
import COROUTINES_PACKAGE.*
|
||||
import helpers.*
|
||||
|
||||
|
||||
+6
-1
@@ -2,13 +2,18 @@
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
// IGNORE_BACKEND: JS
|
||||
import COROUTINES_PACKAGE.*
|
||||
import helpers.*
|
||||
|
||||
// Block is allowed to be called inside the body of owner inline function
|
||||
// Block is allowed to be called from nested classes/lambdas (as common crossinlines)
|
||||
|
||||
// Needed for JS compatibility
|
||||
interface Runnable {
|
||||
fun run(): Unit
|
||||
}
|
||||
|
||||
class Controller {
|
||||
var res = "FAIL 1"
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
// SKIP_SOURCEMAP_REMAPPING
|
||||
import COROUTINES_PACKAGE.*
|
||||
import helpers.*
|
||||
|
||||
|
||||
+6
-1
@@ -2,13 +2,18 @@
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
// IGNORE_BACKEND: JS
|
||||
import COROUTINES_PACKAGE.*
|
||||
import helpers.*
|
||||
|
||||
// Block is allowed to be called inside the body of owner inline function
|
||||
// Block is allowed to be called from nested classes/lambdas (as common crossinlines)
|
||||
|
||||
// Needed for JS compatibility
|
||||
interface Runnable {
|
||||
fun run(): Unit
|
||||
}
|
||||
|
||||
class Controller {
|
||||
var res = "FAIL 1"
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
// SKIP_SOURCEMAP_REMAPPING
|
||||
import COROUTINES_PACKAGE.*
|
||||
import helpers.*
|
||||
|
||||
|
||||
Reference in New Issue
Block a user