Archived
1
0
Fork 0

Initial commit

This commit is contained in:
Henrik Hautakoski 2010-04-20 20:38:50 +02:00 committed by Henrik Hautakoski
commit fdfefe7d55
31 changed files with 3242 additions and 0 deletions

21
test/unit.h Normal file
View file

@ -0,0 +1,21 @@
#ifndef _UNIT_H
#define _UNIT_H
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#define utest_exit(fmt, ...) \
fprintf(stderr, fmt, __VA_ARGS__); \
exit(1)
#define utest_string(a, b) \
(strcmp(a, b) == 0 ? \
(void) 0 : \
utest_exit("ASSERT: \"" #expr "\" at %s:%i\n", __FILE__, __LINE__))
#endif /* _UNIT_H */