Skip to content

Commit

Permalink
fix cvar tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Connum committed Apr 14, 2024
1 parent ad4ad0d commit cad64dd
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions test/tables/cvar.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,23 @@ describe('tables/gvar.js', function() {
};
});


[1].forEach(n => {
const font = fonts[`cvarTest${n}`];
assert.deepEqual(font.tables.cvar.headers.map(h => h.privatePoints),
Array(11).fill([65,66,67,85,87,93]));
assert.deepEqual(font.tables.cvar.headers.map(h => h.deltas),
[
[8,-8,8,-11,0,-1], [-2,8,-7,11,0,1], [56,-24,42,6,-10,-4],
[-44,-66,-39,-28,-39,-22], [22,100,36,19,36,19], [8,0,8,-43,-49,-32],
[-8,0,-8,11,9,1], [-80,0,-90,-6,-47,4], [-16,0,-21,28,39,22],
[-46,0,-22,-19,35,-19], [2,0,7,-11,-9,-1]
]);
});
[2].forEach(n => {
const font = fonts[`cvarTest${n}`];
assert.deepEqual(font.tables.cvar.headers.map(h => h.deltas.length),
Array(11).fill(font.tables.cvt.length));
if('correctly parses cvar deltas', function() {
[1].forEach(n => {
const font = fonts[`cvarTest${n}`];
assert.deepEqual(font.tables.cvar.headers.map(h => h.privatePoints),
Array(11).fill([65,66,67,85,87,93]));
assert.deepEqual(font.tables.cvar.headers.map(h => h.deltas),
[
[8,-8,8,-11,0,-1], [-2,8,-7,11,0,1], [56,-24,42,6,-10,-4],
[-44,-66,-39,-28,-39,-22], [22,100,36,19,36,19], [8,0,8,-43,-49,-32],
[-8,0,-8,11,9,1], [-80,0,-90,-6,-47,4], [-16,0,-21,28,39,22],
[-46,0,-22,-19,35,-19], [2,0,7,-11,-9,-1]
]);
});
[2].forEach(n => {
const font = fonts[`cvarTest${n}`];
assert.deepEqual(font.tables.cvar.headers.map(h => h.deltas.length),
Array(11).fill(font.tables.cvt.length));
});
});
});

0 comments on commit cad64dd

Please sign in to comment.