1
0
mirror of https://github.com/meekrosoft/fff synced 2026-01-23 08:25:59 +01:00
Files
fff/examples/test_suite_template.c
2011-01-01 20:13:33 +01:00

41 lines
668 B
C

#include <assert.h>
#include <stdio.h>
void setup();
#define TEST_F(SUITE, NAME) void NAME()
#define RUN_TEST(TESTNAME) printf(" Running %s: ", #TESTNAME); fflush(0); setup(); TESTNAME(); printf(" SUCCESS\n");
/* Initialializers called for every test */
void setup()
{
}
/* Tests go here */
TEST_F(GreeterTests, hello_world)
{
assert(1 == 0);
}
int main()
{
setbuf(stderr, NULL);
fprintf(stdout, "-------------\n");
fprintf(stdout, "Running Tests\n");
fprintf(stdout, "-------------\n\n");
fflush(0);
/* Run tests */
RUN_TEST(hello_world);
printf("\n-------------\n");
printf("Complete\n");
printf("-------------\n\n");
return 0;
}