Commit a1ff38ae authored by Philipp Schafft's avatar Philipp Schafft 🦁

Feature: Added ctest_diagnostic_printf()

parent 0b559f06
......@@ -11,6 +11,7 @@
#endif
#include <stdio.h>
#include <stdarg.h>
#include "ctest_lib.h"
......@@ -55,6 +56,18 @@ void ctest_diagnostic(const char *line)
printf("# %s\n", line);
}
void ctest_diagnostic_printf(const char *format, ...)
{
va_list ap;
va_start(ap, format);
printf("# ");
vprintf(format, ap);
printf("\n");
va_end(ap);
}
void ctest_bail_out(const char *reason)
{
ctest_g_bailed_out = 1;
......
......@@ -14,6 +14,7 @@ void ctest_fin(void);
void ctest_test(const char *desc, int res);
void ctest_diagnostic(const char *line);
void ctest_diagnostic_printf(const char *format, ...);
void ctest_bail_out(const char *reason);
int ctest_bailed_out(void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment