ERC165.test.js 529 B

12345678910111213141516171819
  1. const { expectRevert } = require('@openzeppelin/test-helpers');
  2. const { shouldSupportInterfaces } = require('./SupportsInterface.behavior');
  3. const ERC165Mock = artifacts.require('ERC165Mock');
  4. contract('ERC165', function (accounts) {
  5. beforeEach(async function () {
  6. this.mock = await ERC165Mock.new();
  7. });
  8. it('does not allow 0xffffffff', async function () {
  9. await expectRevert(this.mock.registerInterface('0xffffffff'), 'ERC165: invalid interface id');
  10. });
  11. shouldSupportInterfaces([
  12. 'ERC165',
  13. ]);
  14. });