Skip to content

Commit

Permalink
added tests for return operator #145
Browse files Browse the repository at this point in the history
  • Loading branch information
tmptrash committed May 10, 2018
1 parent e25a1df commit cf3befa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions client/src/vm/OperatorsSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1028,5 +1028,12 @@ describe("client/src/vm/Operators", () => {
expect(ops.operators[h('100110')].call(ops, 3, code[3], {}, code)).toEqual(1);
expect(ops.operators[h('100111')].call(ops, 1, code[1], {}, code)).toEqual(4);
});
it('Func call should work', () => {
const code = [
h('100111 00000000000000000000000000') // return
];
ops.updateIndexes(code);
expect(ops.operators[h('100111')].call(ops, 0)).toEqual(0);
});
});
});

0 comments on commit cf3befa

Please sign in to comment.