Improve tests for legacy script patches.
Context
This is a follow-up from !3730 (comment 868036266). It refactors tests written for legacy contract patches so that they can:
- exist peacefully when nothing is patched (i.e. most of the time);
- be easily adapted to test new patches;
- be easily disabled when they're not needed anymore (deleting just one line is sufficient).
The test module is turned into a functor, so adding new contract patches to tests is simply a matter of applying that functor. On top of that a test is added which type checks the patched contracts without legacy mode.
Manually testing the MR
$ cd src/proto_alpha/lib_protocol/test/integration/michelson && dune exec ./main.exe -- test 'patched contracts'
Checklist
-
Select suitable reviewers using the Reviewers
field below. -
Select as Assignee
the next person who should take action on that MR
Edited by Sventimir