Added leading underscore to internal functions, renamed supportsInterfaces. (#1435)

This commit is contained in:
Nicolás Venturo
2018-10-18 10:49:01 -03:00
committed by GitHub
parent ff0c048ad9
commit 0231fac514
3 changed files with 30 additions and 30 deletions

View File

@ -32,8 +32,8 @@ contract('ERC165Checker', function () {
supported.should.equal(false);
});
it('does not support mock interface via supportsInterfaces', async function () {
const supported = await this.mock.supportsInterfaces(this.target.address, [DUMMY_ID]);
it('does not support mock interface via supportsAllInterfaces', async function () {
const supported = await this.mock.supportsAllInterfaces(this.target.address, [DUMMY_ID]);
supported.should.equal(false);
});
});
@ -53,8 +53,8 @@ contract('ERC165Checker', function () {
supported.should.equal(false);
});
it('does not support mock interface via supportsInterfaces', async function () {
const supported = await this.mock.supportsInterfaces(this.target.address, [DUMMY_ID]);
it('does not support mock interface via supportsAllInterfaces', async function () {
const supported = await this.mock.supportsAllInterfaces(this.target.address, [DUMMY_ID]);
supported.should.equal(false);
});
});
@ -74,8 +74,8 @@ contract('ERC165Checker', function () {
supported.should.equal(true);
});
it('supports mock interface via supportsInterfaces', async function () {
const supported = await this.mock.supportsInterfaces(this.target.address, [DUMMY_ID]);
it('supports mock interface via supportsAllInterfaces', async function () {
const supported = await this.mock.supportsAllInterfaces(this.target.address, [DUMMY_ID]);
supported.should.equal(true);
});
});
@ -98,22 +98,22 @@ contract('ERC165Checker', function () {
};
});
it('supports all interfaceIds via supportsInterfaces', async function () {
const supported = await this.mock.supportsInterfaces(this.target.address, this.supportedInterfaces);
it('supports all interfaceIds via supportsAllInterfaces', async function () {
const supported = await this.mock.supportsAllInterfaces(this.target.address, this.supportedInterfaces);
supported.should.equal(true);
});
it('supports none of the interfaces queried via supportsInterfaces', async function () {
it('supports none of the interfaces queried via supportsAllInterfaces', async function () {
const interfaceIdsToTest = [DUMMY_UNSUPPORTED_ID, DUMMY_UNSUPPORTED_ID_2];
const supported = await this.mock.supportsInterfaces(this.target.address, interfaceIdsToTest);
const supported = await this.mock.supportsAllInterfaces(this.target.address, interfaceIdsToTest);
supported.should.equal(false);
});
it('supports not all of the interfaces queried via supportsInterfaces', async function () {
it('supports not all of the interfaces queried via supportsAllInterfaces', async function () {
const interfaceIdsToTest = [...this.supportedInterfaces, DUMMY_UNSUPPORTED_ID];
const supported = await this.mock.supportsInterfaces(this.target.address, interfaceIdsToTest);
const supported = await this.mock.supportsAllInterfaces(this.target.address, interfaceIdsToTest);
supported.should.equal(false);
});
});
@ -129,8 +129,8 @@ contract('ERC165Checker', function () {
supported.should.equal(false);
});
it('does not support mock interface via supportsInterfaces', async function () {
const supported = await this.mock.supportsInterfaces(DUMMY_ACCOUNT, [DUMMY_ID]);
it('does not support mock interface via supportsAllInterfaces', async function () {
const supported = await this.mock.supportsAllInterfaces(DUMMY_ACCOUNT, [DUMMY_ID]);
supported.should.equal(false);
});
});