Diff between 4002d4d329a8db62793505dac18947518333b324 and 3fb40e784dc29009e963affb473d96dcf73c2c58

Changed Files

File Additions Deletions Status
src/shared/tester.c +14 -0 modified
src/shared/tester.h +2 -0 modified

Full Patch

diff --git a/src/shared/tester.c b/src/shared/tester.c
index 56e5696..88dfaeb 100644
--- a/src/shared/tester.c
+++ b/src/shared/tester.c
@@ -134,6 +134,20 @@ void tester_print(const char *format, ...)
 	printf("%s\n", COLOR_OFF);
 }
 
+void tester_debug(const char *format, ...)
+{
+	va_list ap;
+
+	if (!tester_use_debug())
+		return;
+
+	printf("  %s", COLOR_WHITE);
+	va_start(ap, format);
+	vprintf(format, ap);
+	va_end(ap);
+	printf("%s\n", COLOR_OFF);
+}
+
 void tester_warn(const char *format, ...)
 {
 	va_list ap;
diff --git a/src/shared/tester.h b/src/shared/tester.h
index 85d5e95..0231f19 100644
--- a/src/shared/tester.h
+++ b/src/shared/tester.h
@@ -33,6 +33,8 @@ void tester_print(const char *format, ...)
 				__attribute__((format(printf, 1, 2)));
 void tester_warn(const char *format, ...)
 				__attribute__((format(printf, 1, 2)));
+void tester_debug(const char *format, ...)
+				__attribute__((format(printf, 1, 2)));
 
 typedef void (*tester_destroy_func_t)(void *user_data);
 typedef void (*tester_data_func_t)(const void *test_data);