* Copyright (C) 1995-2006, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: test.h,v 1.7 2006-07-06 13:10:29 heikki Exp $
+ * $Id: test.h,v 1.9 2006-07-07 13:39:02 heikki Exp $
*/
/** \file test.h
} \
}
+/** \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; \
YAZ_EXPORT void yaz_check_term1(void);
/** \brief used by macro. Should not be called directly */
-YAZ_EXPORT void yaz_check_init_log(char *argv0);
+YAZ_EXPORT void yaz_check_init_log(const char *argv0);
/** \brief used by macro. Should not be called directly */
YAZ_EXPORT void yaz_check_print1(int type, const char *file, int line,
YAZ_EXPORT void yaz_check_eq1(int type, const char *file, int line,
const char *left, const char *right,
int lval, int rval);
+/** \brief used by macro. Should not be called directly */
+YAZ_EXPORT void yaz_check_inc_todo(void);
YAZ_END_CDECL
#endif