From 3466a50227c0c3a66a8959024966adde486fff67 Mon Sep 17 00:00:00 2001 From: James Prevett Date: Mon, 21 Oct 2024 20:53:47 -0500 Subject: [PATCH] Add bigint type test --- test/struct.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/struct.test.ts b/test/struct.test.ts index f035645..83e9996 100644 --- a/test/struct.test.ts +++ b/test/struct.test.ts @@ -19,7 +19,7 @@ class Header { @struct() class AnotherHeader extends Header { - @t.uint64 public _plus = 0x12345678; + @t.uint64 public _plus: bigint = 0x12345678n; @t.uint16 public some: Some = Some.thing; } @@ -61,6 +61,7 @@ assert.equal(omg.header.magic_start, obj.header.magic_start); assert.equal(omg.header.segments, obj.header.segments); assert.equal(omg.header.magic_end, obj.header.magic_end); assert.equal(omg.header._plus, obj.header._plus); +assert(typeof omg.header._plus == 'bigint'); assert.equal(omg.comment, obj.comment.slice(0, 32)); console.log(omg);