issue #198 Test cases for op_mov, op_br, op_cbr
parent
4f7cab694c
commit
4819f38a80
@ -0,0 +1,3 @@
|
||||
f = compiler.load("local a,b = 1,2 return a or b");
|
||||
assert(f and type(f) == 'function')
|
||||
assert(f() == 1)
|
@ -0,0 +1,3 @@
|
||||
f = compiler.load("local a,b = 1,2 return a and b");
|
||||
assert(f and type(f) == 'function')
|
||||
assert(f() == 2)
|
@ -0,0 +1,3 @@
|
||||
f = compiler.load("local a = 2 return 1 or a");
|
||||
assert(f and type(f) == 'function')
|
||||
assert(f() == 1)
|
@ -0,0 +1,3 @@
|
||||
f = compiler.load("local a = 2 return 1 and a");
|
||||
assert(f and type(f) == 'function')
|
||||
assert(f() == 2)
|
Loading…
Reference in new issue