aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/test/exchange/libs.ts
diff options
context:
space:
mode:
authorRemco Bloemen <remco@wicked.ventures>2018-08-24 03:54:13 +0800
committerRemco Bloemen <remco@wicked.ventures>2018-08-25 04:45:10 +0800
commit4159e45aff14c04f2d799ec8a7b6e7f1a4894064 (patch)
tree5cfc878a54eb02aba47011bbc05ef7c175ccaf2e /packages/contracts/test/exchange/libs.ts
parent92497d7df4b61ee62acfdd58bfb98569ff67214e (diff)
downloaddexon-sol-tools-4159e45aff14c04f2d799ec8a7b6e7f1a4894064.tar
dexon-sol-tools-4159e45aff14c04f2d799ec8a7b6e7f1a4894064.tar.gz
dexon-sol-tools-4159e45aff14c04f2d799ec8a7b6e7f1a4894064.tar.bz2
dexon-sol-tools-4159e45aff14c04f2d799ec8a7b6e7f1a4894064.tar.lz
dexon-sol-tools-4159e45aff14c04f2d799ec8a7b6e7f1a4894064.tar.xz
dexon-sol-tools-4159e45aff14c04f2d799ec8a7b6e7f1a4894064.tar.zst
dexon-sol-tools-4159e45aff14c04f2d799ec8a7b6e7f1a4894064.zip
Update tests
Diffstat (limited to 'packages/contracts/test/exchange/libs.ts')
-rw-r--r--packages/contracts/test/exchange/libs.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/contracts/test/exchange/libs.ts b/packages/contracts/test/exchange/libs.ts
index 6c3305d1d..c08d62758 100644
--- a/packages/contracts/test/exchange/libs.ts
+++ b/packages/contracts/test/exchange/libs.ts
@@ -71,13 +71,13 @@ describe('Exchange libs', () => {
// combinatorial tests in test/exchange/internal. They test specific edge
// cases that are not covered by the combinatorial tests.
describe('LibMath', () => {
- it('should return false if there is a rounding error of 0.1%', async () => {
+ it('should return true if there is a rounding error of 0.1%', async () => {
const numerator = new BigNumber(20);
const denominator = new BigNumber(999);
const target = new BigNumber(50);
// rounding error = ((20*50/999) - floor(20*50/999)) / (20*50/999) = 0.1%
const isRoundingError = await libs.publicIsRoundingError.callAsync(numerator, denominator, target);
- expect(isRoundingError).to.be.false();
+ expect(isRoundingError).to.be.true();
});
it('should return false if there is a rounding of 0.09%', async () => {
const numerator = new BigNumber(20);