|
|
|
@ -1,3 +1,6 @@ |
|
|
|
|
#ifndef CONFIG_TEST |
|
|
|
|
#define CONFIG_TEST |
|
|
|
|
|
|
|
|
|
#include "munit/munit.h" |
|
|
|
|
#include "../src/config.c" |
|
|
|
|
#include <unistd.h> //This has getcwd |
|
|
|
@ -80,7 +83,7 @@ MunitResult checkSetConfig(const MunitParameter params[], |
|
|
|
|
return MUNIT_OK; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
MunitTest tests[] = { |
|
|
|
|
static MunitTest config_tests[] = { |
|
|
|
|
{ |
|
|
|
|
"/path_exists/yes", /* name */ |
|
|
|
|
pathThatExists, /* test */ |
|
|
|
@ -144,7 +147,7 @@ MunitTest tests[] = { |
|
|
|
|
|
|
|
|
|
MunitSuite config_test_suite = { |
|
|
|
|
"/config", /* name */ |
|
|
|
|
tests, /* tests */ |
|
|
|
|
config_tests, /* tests */ |
|
|
|
|
NULL, /* suites */ |
|
|
|
|
1, /* iterations */ |
|
|
|
|
MUNIT_SUITE_OPTION_NONE /* options */ |
|
|
|
@ -158,3 +161,5 @@ int main (int argc, char* argv[]) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#endif /* ifndef MAINTEST */ |
|
|
|
|
|
|
|
|
|
#endif /* ifndef CONFIG_TEST */ |
|
|
|
|