Transpile e170b59f

This commit is contained in:
github-actions
2022-02-08 09:01:46 +00:00
parent 6f7d517d7c
commit 47de4b8f94
8 changed files with 45 additions and 39 deletions

View File

@ -74,4 +74,20 @@ contract('SignedMath', function (accounts) {
}
});
});
describe('abs', function () {
for (const n of [
MIN_INT256,
MIN_INT256.addn(1),
new BN('-1'),
new BN('0'),
new BN('1'),
MAX_INT256.subn(1),
MAX_INT256,
]) {
it(`correctly computes the absolute value of ${n}`, async function () {
expect(await this.math.abs(n)).to.be.bignumber.equal(n.abs());
});
}
});
});