Reorganize tests and add library folder
This commit is contained in:
25
test/library/Math.test.js
Normal file
25
test/library/Math.test.js
Normal 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);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user