mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Fix idiv and cvi. Add test case for idiv.
This commit is contained in:
parent
6afb49c6c6
commit
9de52f375d
2 changed files with 12 additions and 3 deletions
|
@ -173,7 +173,16 @@ describe('function', function() {
|
|||
// TODO floor
|
||||
// TODO ge
|
||||
// TODO gt
|
||||
// TODO idiv
|
||||
it('divides to integer', function() {
|
||||
var stack = evaluate('{ 2 3 idiv }');
|
||||
var expectedStack = [0];
|
||||
expect(stack).toMatchArray(expectedStack);
|
||||
});
|
||||
it('divides to negative integer', function() {
|
||||
var stack = evaluate('{ -2 3 idiv }');
|
||||
var expectedStack = [0];
|
||||
expect(stack).toMatchArray(expectedStack);
|
||||
});
|
||||
it('duplicates index', function() {
|
||||
var stack = evaluate('{ 4 3 2 1 2 index }');
|
||||
var expectedStack = [4, 3, 2, 1, 3];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue