summaryrefslogtreecommitdiff
path: root/lily-test.h
diff options
context:
space:
mode:
Diffstat (limited to 'lily-test.h')
-rw-r--r--lily-test.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/lily-test.h b/lily-test.h
index c3f6f8c..c9ae02d 100644
--- a/lily-test.h
+++ b/lily-test.h
@@ -116,6 +116,12 @@ typedef struct lily_test_msg_t {
} lily_test_msg_t;
void lily_msg_destroy(lily_test_msg_t *m);
+void lily_info(const char *location, const char *fmt, ...);
+#define LILY_INFO_(location, ...) \
+ lily_info(location, __VA_ARGS__)
+#define LILY_INFO(...) LILY_INFO_(LILY_LOCATION, __VA_ARGS__)
+#define INFO(...) LILY_INFO(__VA_ARGS__)
+
void lily_check(int x, const char *location, const char *fmt, ...);
#define LILY_CHECK_(str, x, location) \
lily_check(x, location, "%s", str)
@@ -175,6 +181,18 @@ void lily_msg_destroy(lily_test_msg_t *m)
free(m);
}
+
+void lily_info(const char *location, const char *fmt, ...)
+{
+ va_list args;
+ va_start(args, fmt);
+ lily_test_msg_t *m = lily_msg_create(location, fmt, args);
+ va_end(args);
+
+ lily_g.TAIL->next = m;
+ lily_g.TAIL = m;
+}
+
void lily_check(int x, const char *location, const char *fmt, ...)
{
if (!x) {