Improve `expectContractEntrypoints`
Clarification and motivation
Problem: this method returns a bit ambiguous/unclear error message:
- First of all, it uses
show
- It checks only the missing entrypoints, and not extra ones
- If for some entrypoint the types do not match (even at annotations), this will be reported as missing entrypoint (and we won't see both types for comparison, only one of them).
- In another project we have a similar method that reads the expected contract signature from a file, not a contract (sort of a golden test). And we had to duplicate the logic only to change the source.
Acceptance criteria
-
show
is replaced withpretty
(which relies onBuildable
) or something like that. - A detailed (to some extent) diff is reported.
- It is possible to compare the contract's entrypoints against any provided
Map EpName Type
, not only against entrypoints resulting from printing the contract and parsing it back.
Edited by Konstantin Ivanov