Archived
1
0
Fork 0
This repository has been archived on 2026-05-10. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
archived/test/unit.h
2010-10-19 03:31:16 +02:00

21 lines
377 B
C

#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 */