aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2026-01-03 11:42:24 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2026-01-03 11:42:24 -0500
commitc948d5020091cc40fe8eb7f0a21e51a2c1dc3ef5 (patch)
tree0cf80bfe170986d44d7c6831fe037a61e3d1def4 /tests
parent272231cf29b8ce348d53b6950247fd7faec2d372 (diff)
downloadstasis-c948d5020091cc40fe8eb7f0a21e51a2c1dc3ef5.tar.gz
Add STASIS_TEST_MSG macro
Diffstat (limited to 'tests')
-rw-r--r--tests/include/testing.h9
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;