Skip to content

Commit

Permalink
Added stuff to struct test
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed Oct 2, 2024
1 parent 0ee3c75 commit 8b705c4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/struct-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ import { writeFileSync } from 'fs';
import { deserialize, member, serialize, struct, types as t } from '../src/struct.js';
import { join } from 'path';

enum Some {
thing = 1,
one = 2,
}

@struct()
class Header {
@t.char(4) public readonly magic_start = 'test';
Expand All @@ -14,6 +19,8 @@ class Header {
@struct()
class AnotherHeader extends Header {
@t.uint64 public _plus = 0x12345678;

@t.uint16 public some: Some = Some.thing;
}

@struct()
Expand Down

0 comments on commit 8b705c4

Please sign in to comment.