test-framework icon indicating copy to clipboard operation
test-framework copied to clipboard

Provide strict mode

Open PiotrSikora opened this issue 5 years ago • 2 comments

In this mode (or maybe by default?) tests should fail if the extension is making unexpected hostcalls.

PiotrSikora avatar Aug 11 '20 19:08 PiotrSikora

cc @agiachris

PiotrSikora avatar Aug 11 '20 19:08 PiotrSikora

I think this should be optional. Currently, the user has the option to mock parameters and returns from vm->host and vm<-host on specific host functions. We could also create an expectation over the host functions themselves (i.e. without considering the parameters/returns). Low-level mocking on host function parameters and returns should add the host function to the list of expected host calls. This will enable tracking of in-bound host function calls in a specified ordering. What do you think?

agiachris avatar Aug 12 '20 23:08 agiachris