diff options
| author | Mosder <git@mosder.eu> | 2026-09-16 23:47:49 +0200 |
|---|---|---|
| committer | Mosder <git@mosder.eu> | 2026-09-16 23:47:49 +0200 |
| commit | 644130802a51d91b90e85a0769f642c3e0203aef (patch) | |
| tree | ad97ac1da8541a440a86c4c99402354bd94b06ca /include | |
| parent | 4af9b2a86ad5f5b7e59ba882aa527ecead75be0e (diff) | |
feat: added a simple compatibbility layer for functions not from C99 standard
Diffstat (limited to 'include')
| -rw-r--r-- | include/moslib/tester.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/moslib/tester.h b/include/moslib/tester.h index 9f3b482..4c77d73 100644 --- a/include/moslib/tester.h +++ b/include/moslib/tester.h @@ -174,14 +174,14 @@ extern void mos_test_assert(int expression, const char *fail_message); // output // expected output of the function #define mos_test_assert_out(function, stream, output) \ - mos_test_assert_out_fn(function, stream, output, #function, #stream) + mos_test_assert_out_fn(function, &(stream), output, #function, #stream) // Suppress given output // // Arguments: // out // outpout to suppress -extern void mos_suppress_output(FILE *out); +#define mos_suppress_output(out) mos_suppress_output_fn(&(out)) // Unuppress previously suppressed outputs // Will unsupress all of the outputs that were suppressed @@ -219,11 +219,12 @@ extern MosTestGroup *mos_add_test_group_fn(MosTester *tester, const char *group_ extern void mos_test_assert_exit_fn(MosTestFn function, int code, const char *name); extern void mos_test_assert_out_fn( MosTestFn function, - FILE *stream, + FILE **stream, const char *output, const char *fn_name, const char *stream_name ); +extern void mos_suppress_output_fn(FILE **out); extern void mos_add_test_fn(MosTestGroup *group, MosTestFn test, const char *name); #endif // MOSLIB_TESTER_H |
