Reorganize tests and add library folder

This commit is contained in:
AugustoL
2018-01-17 15:33:42 -03:00
parent b0522b9c58
commit 4fbd44fd40
7 changed files with 15 additions and 15 deletions

25
test/library/Math.test.js Normal file
View File

@ -0,0 +1,25 @@
var MathMock = artifacts.require('../mocks/MathMock.sol');
contract('Math', function (accounts) {
let math;
before(async function () {
math = await MathMock.new();
});
it('returns max correctly', async function () {
let a = 5678;
let b = 1234;
await math.max64(a, b);
let result = await math.result();
assert.equal(result, a);
});
it('returns min correctly', async function () {
let a = 5678;
let b = 1234;
await math.min64(a, b);
let result = await math.result();
assert.equal(result, b);
});
});