X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=tests%2Fcalc%2Fcalc.psi;fp=tests%2Fcalc%2Fcalc.psi;h=c90749c0483ccf25702c591f74a5d91376ef4f54;hp=915807ab2522726281a37de502fa06f0ac46c612;hb=e11280a7b6ed67a4d79b14569ca06131ea2338bd;hpb=224b0dc90c463f236a978f41c66c2f2b565038b5 diff --git a/tests/calc/calc.psi b/tests/calc/calc.psi index 915807a..c90749c 100644 --- a/tests/calc/calc.psi +++ b/tests/calc/calc.psi @@ -59,4 +59,49 @@ function test\calc7() : array { to_int(quot), to_int(rem) ); -} \ No newline at end of file +} + +function test\calc8() : array { + let numerator = !0 + !0 + !0; + let denominator = 3; + return to_array(div, + to_int(quot), + to_int(rem) + ); +} + +function test\calc9() : array { + let numerator = 1 && 2; + let denominator = 1; + return to_array(div, + to_int(quot), + to_int(rem) + ); +} + +function test\calc10() : array { + let numerator = (1 | 2 | 4) & ~3; + let denominator = 4; + return to_array(div, + to_int(quot), + to_int(rem) + ); +} + +function test\calc11() : array { + let numerator = 1 + (1 + 1 < 2); + let denominator = 1; + return to_array(div, + to_int(quot), + to_int(rem) + ); +} + +function test\calc12() : array { + let numerator = 1 + (1 + 1 < 3); + let denominator = 2; + return to_array(div, + to_int(quot), + to_int(rem) + ); +}