type:added
This MR adds support for saving/restoring the context in testing framework:
Test.save_context : unit -> unit
Test.restore_context : unit -> unit
This could be useful for doing testing of contracts, you set up a context, and then try different transactions on the very same context instead of resetting the whole context.
Changelog details:
Test.save_context
and Test.restore_context
New operations -
Test.save_context : unit -> unit
: takes current testing framework context and saves it, pushing it into a stack of contexts. -
Test.restore_context : unit -> unit
: pops a testing framework context from the stack of contexts, and sets it up as the new current context. In case the stack was empty, the current context is kept.