Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Gusarich committed Mar 5, 2024
1 parent 14963bb commit 207d90c
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/test/feature-math.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,14 +346,12 @@ describe('feature-math', () => {
);
}

for (let num = 1n; num <= 100n; num++) {
for (let base = 1n; base <= 10; base++) {
try {
const a = Math.floor(Math.log(Number(num)));
const b = Math.floor(Math.log(Number(base)));
const c = BigInt(a / b);
expect(await contract.getLog(num, base)).toBe(c);
} catch (e) {}
for (let num = 1n; num <= 10n; num++) {
for (let base = 2n; base <= 10; base++) {
const a = Math.floor(Math.log2(Number(num)));
const b = Math.floor(Math.log2(Number(base)));
const c = BigInt(Math.floor(a / b));
expect(await contract.getLog(num, base)).toBe(c);
}
}
});
Expand Down

0 comments on commit 207d90c

Please sign in to comment.