mirror of
https://github.com/allaunthefox/SilverSight.git
synced 2026-07-31 01:25:21 +00:00
fix(octave): correct division test expected value
This commit is contained in:
parent
9f2b868920
commit
3323a626ab
1 changed files with 1 additions and 1 deletions
|
|
@ -27,7 +27,7 @@ function test_div()
|
||||||
prog{3} = struct('op', AVM.OP_PRIM, 'arg', int32(AVM.PRIM_DIV_Q16), 'arg2', false);
|
prog{3} = struct('op', AVM.OP_PRIM, 'arg', int32(AVM.PRIM_DIV_Q16), 'arg2', false);
|
||||||
prog{4} = struct('op', AVM.OP_HALT, 'arg', int32(0), 'arg2', false);
|
prog{4} = struct('op', AVM.OP_HALT, 'arg', int32(0), 'arg2', false);
|
||||||
s = AVM.run(AVM.init_state(0), prog, 100);
|
s = AVM.run(AVM.init_state(0), prog, 100);
|
||||||
expected = idivide(int32(3*QS), int32(5*QS), 'floor') * int32(QS);
|
expected = int32(idivide(int32(3)*int32(QS), int32(5), 'floor'));
|
||||||
if s.stack{1}.i == expected; fprintf(stdout, " ✅ div_q16: 3/5\n");
|
if s.stack{1}.i == expected; fprintf(stdout, " ✅ div_q16: 3/5\n");
|
||||||
else; fprintf(stdout, " ❌ div_q16\n"); end
|
else; fprintf(stdout, " ❌ div_q16\n"); end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue