+/** \brief a test we know will fail at this time.
+ *
+ * Later, when the bug is fixed, this test will suddenly pass,
+ * which will be reported as an error, to remind you to go and fix
+ * your tests.
+ */
+
+#define YAZ_CHECK_TODO(as) { \
+ yaz_check_inc_todo(); \
+ if (!as) { \
+ yaz_check_print1(YAZ_TEST_TYPE_OK, __FILE__, __LINE__, "TODO: " #as); \
+ } else { \
+ yaz_check_print1(YAZ_TEST_TYPE_FAIL, __FILE__, __LINE__, "TODO: "#as); \
+ } \
+}
+
+/** \brief equality test. left, right only evaluated once */
+#define YAZ_CHECK_EQ(left, right) { \
+ int lval = left; \
+ int rval = right; \
+ if (lval == rval) { \
+ yaz_check_eq1(YAZ_TEST_TYPE_OK, __FILE__, __LINE__, \
+ #left, #right, lval, rval); \
+ } else { \
+ yaz_check_eq1(YAZ_TEST_TYPE_FAIL, __FILE__, __LINE__, \
+ #left, #right, lval, rval); \
+ } \
+}
+
+/** \brief Macro to initialize the system (in start of main typically) */