[JS IR] Make tests that use directives pass with IR BE

This commit is contained in:
Sergej Jaskiewicz
2021-10-04 20:44:06 +03:00
committed by Space
parent a359e503fb
commit 65d40c2253
101 changed files with 415 additions and 217 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
// EXPECTED_REACHABLE_NODES: 1296
package foo
// CHECK_CONTAINS_NO_CALLS: add
// CHECK_CONTAINS_NO_CALLS: myAdd
internal data class IntPair(public var fst: Int, public var snd: Int) {
inline public fun getFst(): Int { return fst }
@@ -11,7 +11,7 @@ internal data class IntPair(public var fst: Int, public var snd: Int) {
inline public fun setSnd(v: Int) { this.snd = v }
}
internal fun add(p: IntPair, toFst: Int, toSnd: Int) {
internal fun myAdd(p: IntPair, toFst: Int, toSnd: Int) {
val fst = p.getFst()
p.setFst(fst + toFst)
@@ -21,7 +21,7 @@ internal fun add(p: IntPair, toFst: Int, toSnd: Int) {
fun box(): String {
val p = IntPair(0, 0)
add(p, 1, 2)
myAdd(p, 1, 2)
assertEquals(IntPair(1, 2), p)
return "OK"