Skip to content

Commit 9add255

Browse files
committed
Add a testcase for if statements.
1 parent 29964a1 commit 9add255

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/index.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,3 +199,17 @@ exports.testAbs = asmAssert(
199199
}
200200
return f;
201201
}, { pass: true });
202+
203+
exports.testIf = asmAssert(
204+
"if condition is Int",
205+
function m(){
206+
"use asm";
207+
function f(x,y) {
208+
x = x|0;
209+
y = y|0;
210+
if (x) {
211+
y = 3;
212+
}
213+
}
214+
return f;
215+
}, { pass: true });

0 commit comments

Comments
 (0)