diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-01-03 11:42:24 -0500 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-01-03 11:42:24 -0500 |
| commit | c948d5020091cc40fe8eb7f0a21e51a2c1dc3ef5 (patch) | |
| tree | 0cf80bfe170986d44d7c6831fe037a61e3d1def4 /tests | |
| parent | 272231cf29b8ce348d53b6950247fd7faec2d372 (diff) | |
| download | stasis-c948d5020091cc40fe8eb7f0a21e51a2c1dc3ef5.tar.gz | |
Add STASIS_TEST_MSG macro
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/include/testing.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/include/testing.h b/tests/include/testing.h index ab24115..6fa5ca6 100644 --- a/tests/include/testing.h +++ b/tests/include/testing.h @@ -9,6 +9,15 @@ #define __FILE_NAME__ __FILE__ #endif +#ifdef STASIS_TEST_VERBOSE +#define STASIS_TEST_MSG(MSG, ...) do { \ +fprintf(stderr, "%s:%d:%s(): ", path_basename(__FILE__), __LINE__, __FUNCTION__); \ +fprintf(stderr, MSG LINE_SEP, __VA_ARGS__); \ +} while (0) +#else +#define STASIS_TEST_MSG(MSG, ...) do {} while (0) +#endif + typedef void(STASIS_TEST_FUNC)(); struct stasis_test_result_t { const char *filename; |
