mirror of openzeppelin-contracts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
openzeppelin-contracts/test/Math.test.js

25 lines
559 B

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);
});
});