X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fapi%2Ftestlib.h;h=298e88092046e920dbb6ab2f613fcae10a9ea150;hb=aed917ab8001642c774a55a4a4fffe9a26887a52;hp=132ef95b49131df0e6b4e56f2406c0975d8ebde3;hpb=b742367152889d22ee12cfb286c3013193ca3047;p=idzebra-moved-to-github.git diff --git a/test/api/testlib.h b/test/api/testlib.h index 132ef95..298e880 100644 --- a/test/api/testlib.h +++ b/test/api/testlib.h @@ -1,4 +1,4 @@ -/* $Id: testlib.h,v 1.16 2005-09-13 11:51:07 adam Exp $ +/* $Id: testlib.h,v 1.17 2005-12-15 13:28:32 adam Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -115,3 +115,6 @@ void meta_query(int lineno, ZebraHandle zh, char *query, int exphits, * if filter given by name does not exist, exit nicely but warn in log */ void check_filter(ZebraService zs, const char *name); + +#define TL_ASSERT(x) if (!(x)) { yaz_log(YLOG_FATAL, "%s:%d TL_ASSERT(%s) failed", __FILE__, __LINE__, #x); exit(1); } +#define TL_ASSERT2(x,m) if (!(x)) { yaz_log(YLOG_WARN, "%s", m); yaz_log(YLOG_FATAL, "%s:%d TL_ASSERT(%s) failed", __FILE__, __LINE__, #x); exit(1); }