Skip to content

Commit

Permalink
Check byteLength
Browse files Browse the repository at this point in the history
  • Loading branch information
chadhietala committed Apr 13, 2018
1 parent 6b8fded commit eddb932
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@glimmer/program/test/heap-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ QUnit.test('Can grow', (assert) => {
// we get the whole thing out
let serialized = heap.capture(Number.MAX_SAFE_INTEGER);
let serializedHeap = new Uint16Array(serialized.buffer);
assert.equal(serializedHeap.length, size);
assert.equal(serializedHeap.byteLength, size * 2);
assert.equal(serializedHeap[size - 1], 10);

heap.push(11);

serialized = heap.capture(Number.MAX_SAFE_INTEGER);
serializedHeap = new Uint16Array(serialized.buffer);
assert.equal(serializedHeap.length, size * 2);
assert.equal(serializedHeap.byteLength, size * 4);
assert.equal(serializedHeap[size], 11);
});

0 comments on commit eddb932

Please sign in to comment.