[FIR & IR] Implement JS MPP test infrastructure

^KT-55295 Fixed
This commit is contained in:
Ivan Kochurkin
2023-01-21 15:38:51 +01:00
committed by Space Team
parent e42efe1ee6
commit d401ff7b09
13 changed files with 141 additions and 52 deletions
@@ -1,7 +1,7 @@
// !LANGUAGE: +MultiPlatformProjects
// WITH_STDLIB
// IGNORE_BACKEND_K1: ANY
// IGNORE_BACKEND_K2: JS_IR, NATIVE
// IGNORE_BACKEND_K2: NATIVE
// MODULE: common
// FILE: common.kt
@@ -0,0 +1,28 @@
// KJS_WITH_FULL_RUNTIME
// IGNORE_BACKEND_K1: JS, JS_IR, JS_IR_ES6
// TARGET_BACKEND: JS_IR
// !LANGUAGE: +MultiPlatformProjects
// MODULE: common
// TARGET_PLATFORM: Common
// FILE: common.kt
expect fun func(): String
expect var prop: String
fun test(): String {
prop = "K"
return func() + prop
}
// MODULE: js()()(common)
// TARGET_PLATFORM: JS
// FILE: main.kt
actual fun func(): String = "O"
actual var prop: String = "!"
fun box() = test()