tests: use custom assertion define

This commit is contained in:
Yury Popov
2022-12-26 00:53:57 +03:00
committed by Alexander Epaneshnikov
parent af0a28f9db
commit f60f1590db
6 changed files with 961 additions and 947 deletions
+13
View File
@@ -0,0 +1,13 @@
#pragma once
#include <stdio.h>
#include <stdio.h>
#define TEST_ASSERT(x) { \
if (!((x))) { \
fflush(stdout); \
fprintf(stderr, "FAILED: [%s:%d] %s\n", __FILE__, __LINE__, #x); \
fflush(stderr); \
exit(1); \
} \
}