aboutsummaryrefslogtreecommitdiff
path: root/tests/include/testing.h
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@users.noreply.github.com>2026-01-06 10:40:53 -0500
committerGitHub <noreply@github.com>2026-01-06 10:40:53 -0500
commitafbb98e79e9df429bff491bc1071645536bbbd3c (patch)
treedeac710a47ccfbc58aceb44e6f2cb65fb44901d8 /tests/include/testing.h
parentcf50be9ef96fd8011fbd45321b4c454470112cf4 (diff)
parent0ad1fc6e37835bd2a7bfbda41be1bf22f8f6bc5e (diff)
downloadstasis-afbb98e79e9df429bff491bc1071645536bbbd3c.tar.gz
Merge pull request #118 from jhunkeler/semaphore
Semaphore
Diffstat (limited to 'tests/include/testing.h')
-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;