Skip to content
Snippets Groups Projects
Commit c4f0cc05 authored by TwilCynder's avatar TwilCynder
Browse files

markdown documentation

parent fa380b9b
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,7 @@ The TesterInit function of a Tester is called once before mojitos is ran. It is
.Pp
The TesterReader function of a Tester is called everytime mojitos outputs something. It is given a pointer to the null-terminated string that was read on mojitos output.
.Pp
The TesterFinalizer function of a Tester is called once mojitos exits, and should return a non-zero value if the test failed (incorrect mojitos output), or 0 otherwise.
The TesterFinalizer function of a Tester is called once mojitos exits, and should return 0 if the test failed (incorrect mojitos output), or a non-zero value otherwise.
.Pp
Notice how every function is also give a *context pointer. This pointer is the context property of the current Execution.
......
......@@ -41,6 +41,6 @@ typedef int(*TesterFinalizer)(void *state, void *context);
```
- The *TesterInit* function of a Tester is called once before `mojitos` is ran. It is given a pointer pointer to the state pointer, that will then be passed directly to the two other functions. Use this to allocate memory for a state-sotring structure.
- The *TesterReader* function of a Tester is called everytime `mojitos` outputs something. It is given a pointer to the null-terminated string that was read on mojitos output.
- The *TesterFinalizer* function of a Tester is called once `mojitos` exits, and should return a non-zero value if the test failed (incorrect mojitos output), or 0 otherwise. /!\ If this test uses a state object, it must be freed here !
- The *TesterFinalizer* function of a Tester is called once `mojitos` exits, and should return 0 if the test failed (incorrect mojitos output), or a non-zero value otherwise. /!\ If this test uses a state object, it must be freed here !
Notice how every function is also give a \**context* pointer. This pointer is the context property of the current Execution.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment