1
0
mirror of https://github.com/meekrosoft/fff synced 2026-01-27 18:24:28 +01:00

Refactor test/ directory to match the rest of the project.

The prior PR didn't touch this directory because it was getting too big
and I wanted the diff to be smaller for the test directory. Now addressing
that.

Signed-off-by: Yuval Peress <peress@google.com>
This commit is contained in:
Yuval Peress
2022-08-11 11:26:55 -06:00
parent 488442255c
commit 1f6a3c8331
9 changed files with 18 additions and 14 deletions

View File

@@ -0,0 +1,15 @@
#ifndef C_TEST_FRAMEWORK_H_
#define C_TEST_FRAMEWORK_H_
#include <assert.h>
#include <stdio.h>
#include <string.h>
/* Test Framework :-) */
void setup();
#define TEST_F(SUITE, NAME) void NAME()
#define RUN_TEST(SUITE, TESTNAME) do { printf(" Running %s.%s: \n", #SUITE, #TESTNAME); setup(); TESTNAME(); printf(" SUCCESS\n"); } while (0)
#define ASSERT_EQ(A, B) assert((A) == (B))
#define ASSERT_TRUE(A) assert((A))
#endif /* C_TEST_FRAMEWORK_H_ */