* Error handling in ERC20 and ERC721 * Added message string for require. * Fixed solhint errors. * Updated PR as per issue #1709 * changes as per #1709 and openzeppelin forum. * Changes in require statement * Changes in require statement * build pipeline fix * Changes as per @nventuro's comment. * Update revert reason strings. * Fianal update of revert reason strings. * WIP: Updating reason strings in test cases * WIP: Added changes to ERC20 and ERC721 * Fixes linting errors in *.tes.js files * Achieved 100% code coverage * Updated the test cases with shouldFail.reverting.withMessage() * Fix package-lock. * address review comments * fix linter issues * fix remaining revert reasons
19 lines
537 B
JavaScript
19 lines
537 B
JavaScript
const { shouldFail } = require('openzeppelin-test-helpers');
|
|
const { shouldSupportInterfaces } = require('./SupportsInterface.behavior');
|
|
|
|
const ERC165Mock = artifacts.require('ERC165Mock');
|
|
|
|
contract('ERC165', function () {
|
|
beforeEach(async function () {
|
|
this.mock = await ERC165Mock.new();
|
|
});
|
|
|
|
it('does not allow 0xffffffff', async function () {
|
|
await shouldFail.reverting.withMessage(this.mock.registerInterface('0xffffffff'), 'ERC165: invalid interface id');
|
|
});
|
|
|
|
shouldSupportInterfaces([
|
|
'ERC165',
|
|
]);
|
|
});
|