Update to testrpc 6.0.1 and test fixes for revert opcode.
This commit is contained in:
committed by
Alejandro Santander
parent
b9cbea1c9c
commit
c29dd086d3
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
const assertJump = require('./helpers/assertJump');
|
||||
const assertRevert = require('./helpers/assertRevert');
|
||||
const expectThrow = require('./helpers/expectThrow');
|
||||
var StandardTokenMock = artifacts.require('./helpers/StandardTokenMock.sol');
|
||||
|
||||
@ -42,7 +42,7 @@ contract('StandardToken', function(accounts) {
|
||||
await token.transfer(accounts[1], 101);
|
||||
assert.fail('should have thrown before');
|
||||
} catch(error) {
|
||||
assertJump(error);
|
||||
assertRevert(error);
|
||||
}
|
||||
});
|
||||
|
||||
@ -67,7 +67,7 @@ contract('StandardToken', function(accounts) {
|
||||
await token.transferFrom(accounts[0], accounts[2], 100, {from: accounts[1]});
|
||||
assert.fail('should have thrown before');
|
||||
} catch (error) {
|
||||
assertJump(error);
|
||||
assertRevert(error);
|
||||
}
|
||||
});
|
||||
|
||||
@ -78,7 +78,7 @@ contract('StandardToken', function(accounts) {
|
||||
await token.transferFrom(accounts[0], accounts[2], balance0+1, {from: accounts[1]});
|
||||
assert.fail('should have thrown before');
|
||||
} catch (error) {
|
||||
assertJump(error);
|
||||
assertRevert(error);
|
||||
}
|
||||
});
|
||||
|
||||
@ -113,7 +113,7 @@ contract('StandardToken', function(accounts) {
|
||||
let transfer = await token.transfer(0x0, 100);
|
||||
assert.fail('should have thrown before');
|
||||
} catch(error) {
|
||||
assertJump(error);
|
||||
assertRevert(error);
|
||||
}
|
||||
});
|
||||
|
||||
@ -124,7 +124,7 @@ contract('StandardToken', function(accounts) {
|
||||
let transfer = await token.transferFrom(accounts[0], 0x0, 100, {from: accounts[1]});
|
||||
assert.fail('should have thrown before');
|
||||
} catch(error) {
|
||||
assertJump(error);
|
||||
assertRevert(error);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user