Skip to content

Commit

Permalink
fixup int test
Browse files Browse the repository at this point in the history
  • Loading branch information
mitschabaude committed Mar 7, 2024
1 parent 99e8ccc commit 9eb9d7c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/lib/int.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,8 @@ describe('int', () => {
});

it('should throw checking over MAXINT', () => {
const aboveMax = new UInt64((1n << 64n).toString()); // This number is defined in UInt64.MAXINT()
const aboveMax = new UInt64(1);
aboveMax.value = Field(1n << 64n);
expect(() => {
UInt64.check(aboveMax);
}).toThrow();
Expand Down Expand Up @@ -1990,9 +1991,10 @@ describe('int', () => {
});

it('should throw checking over MAXINT', () => {
const x = new UInt32((1n << 32n).toString()); // This number is defined in UInt32.MAXINT()
const aboveMax = new UInt32(1);
aboveMax.value = Field(1n << 32n);
expect(() => {
UInt32.check(x);
UInt32.check(aboveMax);
}).toThrow();
});
});
Expand Down

0 comments on commit 9eb9d7c

Please sign in to comment.