Increase test coverage to 93% #549 (#768)

* Increase test coverage to 93% #549

* cover missing AllowanceCrowdsale branch

* improve Heritable coverage

* fix lint errors

* proper equal assert

* address review comments

* remove unneeded const definitions and imports

* use assertRevert

* reword scenario description

* Increase test coverage to 93% #549

* cover missing AllowanceCrowdsale branch

* improve Heritable coverage

* fix lint errors

* proper equal assert

* address review comments

* remove unneeded const definitions and imports

* use assertRevert

* reword scenario description

* move HIGH_GOAL constant to the scope where it's used

* remove const at top level

* address review comments
This commit is contained in:
Federico Gimenez
2018-04-17 20:05:34 +02:00
committed by Francisco Giordano
parent 6a7114fdb4
commit f4bdaf49a1
5 changed files with 82 additions and 8 deletions

View File

@ -7,19 +7,37 @@ contract('Math', function (accounts) {
math = await MathMock.new();
});
it('returns max correctly', async function () {
it('returns max64 correctly', async function () {
let a = 5678;
let b = 1234;
await math.max64(a, b);
let result = await math.result();
let result = await math.result64();
assert.equal(result, a);
});
it('returns min correctly', async function () {
it('returns min64 correctly', async function () {
let a = 5678;
let b = 1234;
await math.min64(a, b);
let result = await math.result();
let result = await math.result64();
assert.equal(result, b);
});
it('returns max256 correctly', async function () {
let a = 5678;
let b = 1234;
await math.max256(a, b);
let result = await math.result256();
assert.equal(result, a);
});
it('returns min256 correctly', async function () {
let a = 5678;
let b = 1234;
await math.min256(a, b);
let result = await math.result256();
assert.equal(result, b);
});
});