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

Merge branch 'teo_tests' of https://gitlab.com/cocktail_mojitos/mojitos into teo_tests

parents 4abacd5f fa8605ac
No related branches found
No related tags found
No related merge requests found
......@@ -42,9 +42,11 @@ typedef void(*TesterInit)(void **state, void *context);
typedef void(*TesterReader)(void *state, void *context, const char *buffer, int read_size);
typedef int(*TesterFinalizer)(void *state, void *context);
.Ed
.Pp
.Pp
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.
.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.
.Pp
Notice how every function is also give a *context pointer. This pointer is the context property of the current Execution.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment