blob: 64551646ef273aea291da4d051fc3da2325c3624 (
plain) (
tree)
|
|
typedef void (*test_fn)(void);
const test_fn Tests[] = {
#include "test_list" // auto-generated; see 'build*' scripts
};
// Names for each element of the 'Tests' global, respectively.
const string Test_names[] = {
#include "test_name_list" // auto-generated; see 'build*' scripts
};
bool Passed = true;
long Num_failures = 0;
#define CHECK(X) \
if (!(X)) { \
++Num_failures; \
cerr << "\nF " << __FUNCTION__ << "(" << __FILE__ << ":" << __LINE__ << "): " << #X << '\n'; \
Passed = false; \
return; \
}
#define CHECK_EQ(X, Y) \
if ((X) != (Y)) { \
++Num_failures; \
cerr << "\nF " << __FUNCTION__ << "(" << __FILE__ << ":" << __LINE__ << "): " << #X << " == " << #Y << '\n'; \
cerr << " got " << (X) << '\n'; /* BEWARE: multiple eval */ \
Passed = false; \
return; \
}
|