Closed Amxx closed 2 years ago
Possibly similar issue in #649 (Diamond) ...
Have you tried making a test-only contract that extends the abstract contract and run your tests against it?
I'm not sure what you mean.
We have our abstract contract, we have implementations, and we run our tests against the implementation. What would a test-only contract be ?
What would a test-only contract be ?
Err... a contract meant only for testing. Reading your issue description, it sounded like you were trying to test the abstract contract.
@amxx
If you have a chance, could you see if the change in PR #660 resolves your test failures?
Have published the branch at tag eip165
- you can install with:
yarn add solidity-coverage@eip165 --dev
This should be fixed in 0.7.18
. Please just ping if you're still having problems getting these tests to pass.
ERC165 enables some form of contract introspection, by advertizing supported interfaces. Some implementation hardcode the interface identifier
And others use solidity's built-in interfaceId getter
IMO, these mechanism is to be tested in unit tests, to achieve full coverage of the code. However, we noticed that these tests do fail when
SomeInterfaceOrContract
is anabstract contract
, possibly because functions are inserted by the coverage tool. This causes the corresponding tests to fail under coverage.How can we prevent that? The abstract contract I'm talking about does not contain any storage definition, and all function definitions are abstract public or external functions.