Skip to content

Commit

Permalink
add more tests to bn sqrt
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtSuslov committed Jul 11, 2023
1 parent ecd6454 commit d01e133
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/tools/src/bn/bn.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,8 @@ describe('performs BN unit test', () => {
expect(BN.fromRaw(1, 6).sqrt().value).toBe('1000000')
expect(BN.fromRaw(9, 3).sqrt().value).toBe('3000')
expect(BN.fromRaw(10, 3).sqrt().value).toBe('3162')
expect(BN.fromRaw(10, 18).sqrt().value).toBe('3162277660168379331')
expect(BN.fromRaw(1024, 18).sqrt().value).toBe('32000000000000000000')
expect(BN.fromRaw(0, 3).sqrt().value).toBe('0')
})

Expand Down

0 comments on commit d01e133

Please sign in to comment.