Lumiera
0.pre.03
»edit your freedom«
|
Verify the behaviour of the type erased closure, which is used by Steam-Layer commands to implement the capturing and later re-invocation of a function.
Definition at line 78 of file command-mutation-test.cpp.
Private Member Functions | |
void | checkMutation () |
void | checkStateCapturingMechanism () |
void | checkUndoMutation () |
virtual void | run (Arg) |
|
inlineprivate |
Then create a argument closure and use this to invoke the Mutation and verify actually testFunc(param)
is executed.
Definition at line 97 of file command-mutation-test.cpp.
|
inlineprivate |
This time, we use our testFunc(int)
as implementation of the "undo" function; thus its parameter has now the meaning of an captured state value. Consequently this time the operation which is to be undone would have the signature void(void)
. Obviously this is a rather silly "undo" function, but it is easy to check for unit testing. To carry out this test, we first have to trigger the state capturing mechanism; after that, invoking the UndoMutation will call the testFunc with the previously captured state.
Definition at line 142 of file command-mutation-test.cpp.
|
inlineprivate |
Definition at line 189 of file command-mutation-test.cpp.