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

26 lines
596 B
C

#ifndef _UNIT_H
#define _UNIT_H 1
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#define __uexit(file, line, func, fmt, ...) \
do { \
fprintf(stderr, "ASSERT %s in %s(%i): " fmt, func, file, line, __VA_ARGS__); \
exit(1); \
} while(0)
/* internal function. assert_* macros below expands to this */
void __assert_str(char *file, int line, char *func, char *a, char *b);
#define assert_string(a, b) __assert_str(__FILE__, __LINE__, __FUNCTION__, a, b)
void utest_init_RNG();
char* utest_ran_string(size_t size);
#endif /* _UNIT_H */