Archived
1
0
Fork 0

some cleanup and extended insertion in rbtree, updated rbtree test

This commit is contained in:
Henrik Hautakoski 2010-04-28 08:49:15 +02:00 committed by Henrik Hautakoski
parent 401b11fdcf
commit f630cbf979
8 changed files with 382 additions and 310 deletions

View file

@ -8,14 +8,11 @@
#include <string.h>
#include <assert.h>
#define utest_exit(fmt, ...) \
fprintf(stderr, fmt, __VA_ARGS__); \
exit(1)
#define assert_string(a, b) \
assert(strcmp((char*)a, (char*)b) == 0)
void utest_init_RNG();
char* utest_ran_string(size_t size);
#define utest_string(a, b) \
(strcmp(a, b) == 0 ? \
(void) 0 : \
utest_exit("ASSERT: \"" #expr "\" at %s:%i\n", __FILE__, __LINE__))
#endif /* _UNIT_H */