#ifndef _TESTH_H
#define _TESTS_H

#include <stdio.h>
#include "macros.h"

/// Run a test before `main()`
#define RUNTEST(name) __attribute__((constructor)) void _runtest__ ## name () { \
		fprintf(stderr, "[!] <--- running test " #name " --- \n"); \
		CALLTEST(name); \
		fprintf(stderr, "[!] --- " #name " ok --->\n"); \
	}

#ifdef DEBUG
#define RUNTEST_DEBUG(name) RUNTEST(name)
#else
#define RUNTEST_DEBUG(name)
#endif

DEFTEST(version_str);

#endif /* _TESTS_H */
