From ddbca0141fe17d257bcf25b47aeae39348ba5d48 Mon Sep 17 00:00:00 2001 From: Gregg Tavares Date: Sat, 30 Dec 2023 22:45:18 -0800 Subject: [PATCH] add test --- test/tests/buffer-views-test.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/tests/buffer-views-test.js b/test/tests/buffer-views-test.js index afc8dc9..4f654ca 100644 --- a/test/tests/buffer-views-test.js +++ b/test/tests/buffer-views-test.js @@ -1124,6 +1124,10 @@ describe('buffer-views-tests', () => { const {size, align} = getSizeAndAlignmentOfUnsizedArrayElement(d.storages.foo8); assertEqual(size, (4 + 4) * 4 * 5); assertEqual(align, 4); + const numElements = 3; + const { views } = makeStructuredView(d.storages.foo8, new ArrayBuffer(d.storages.foo8.size + size * numElements)); + assertEqual(views.bar.length, 3); + assertEqual(views.bar[2].length, 5); }); });