libmrbesen/tests/test.h

14 lines
518 B
C
Raw Normal View History

2020-09-28 23:49:14 +02:00
#define TESTFAILED 0
#define TESTGOOD 1
#include <iostream>
#define TESTDATA "./tests/data/"
#define ASSERT(BED, ERR) if(!(BED)) { std::cout << __FILE__ << ":" << __LINE__ << " " << ERR << std::endl; return TESTFAILED; }
2021-02-07 21:25:58 +01:00
#define CMPASSERTE(A, B, ERR) if( !((A) == (B))) { std::cout << __FILE__ << ":" << __LINE__ << " is: \"" << (A) << "\" should: \"" << (B) << "\""<< std::endl; return TESTFAILED; }
#define CMPASSERT(A, B) CMPASSERTE(A, B, "")
2020-09-28 23:49:14 +02:00
// #define ASSERT(BED) ASSERT(BED, "")
typedef int (*test_t)();