CFLAGS += -DWVTEST_CONFIGURED
lib_LIBRARIES = wvtest
-wvtest_SOURCES = wvtestmain.c wvtest.c
+wvtest_SOURCES = wvtestmain.c wvtest.c wvtestfrsh.c
wvtest_PROGRAMS = wvtest.t
wvtest.t_SOURCES = t/wvtest.t.c
const char *a, const char *b, bool expect_pass);
bool wvtest_start_check_lt_str(const char *file, int line,
const char *a, const char *b);
+int wvtest_start_check_frsh(const char *file, int line,
+ const char *condstr, int frsh_retval);
#define WVPASS(cond) \
#define WVPASSNESTR(a, b) WVFAILEQSTR(a, b)
#define WVFAILNE(a, b) WVPASSEQ(a, b)
#define WVFAILNESTR(a, b) WVPASSEQSTR(a, b)
+#define WVFRSH(frshretval) \
+ wvtest_start_check_frsh(__FILE__, __LINE__, #frshretval, (frshretval))
+
#define WVTEST_MAIN3(_descr, ff, ll, _slowness) \
static void _wvtest_main_##ll(); \
--- /dev/null
+#include "wvtest.h"
+#include <frsh_error.h>
+
+int wvtest_start_check_frsh(const char *file, int line,
+ const char *condstr, int frsh_retval)
+{
+ char errstr[80] = "ok";
+ wvtest_start(file, line, condstr);
+ if (frsh_retval != 0)
+ frsh_strerror (frsh_retval, errstr, sizeof(errstr));
+
+ wvtest_check(frsh_retval == 0, errstr);
+
+ return frsh_retval;
+}