Basic tests infrastructure

This commit is contained in:
Xiphoseer
2022-01-03 16:00:21 +01:00
parent 203e75ef3d
commit a591dbfe9c
7 changed files with 76 additions and 8 deletions

4
tests/CommonCxxTests.h Normal file
View File

@@ -0,0 +1,4 @@
#include <cstdio>
#define ASSERT_EQ(a,b) { if (!(a == b)) { printf("Failed assertion: " #a " == " #b " \n in %s:%d\n", __FILE__, __LINE__); return 1; }}
#define ASSERT_NE(a,b) { if (!(a != b)) { printf("Failed assertion: " #a " != " #b " \n in %s:%d\n", __FILE__, __LINE__); return 1; }}