From 0e53f180adcd1b0e25491cad1e6d636579439666 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Mon, 10 Jan 2022 09:40:34 +0000 Subject: [PATCH] renames some things in config tests --- tests/all.test.c | 8 ++++++++ tests/config.test.c | 9 +++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/tests/all.test.c b/tests/all.test.c index 6d10b4d..7c64ac5 100644 --- a/tests/all.test.c +++ b/tests/all.test.c @@ -2,8 +2,14 @@ #define MAINTEST #include "munit/munit.h" + #include "config.test.c" #include "request.test.c" +#include "response.test.c" +#ifndef REQUESTRESPONSE_C +#define REQUESTRESPONSE_C value +#include "requestresponse.test.c" +#endif /* ifndef REQUESTRESPONSE_C */ #include #include @@ -15,6 +21,8 @@ int main (int argc, char* argv[]) { MunitSuite all_suites[] = { config_test_suite, request_test_suite, + response_test_suite, + requestresponse_test_suite, { NULL, NULL, NULL, 0, MUNIT_SUITE_OPTION_NONE } }; diff --git a/tests/config.test.c b/tests/config.test.c index 1828512..fb2f596 100644 --- a/tests/config.test.c +++ b/tests/config.test.c @@ -1,3 +1,6 @@ +#ifndef CONFIG_TEST +#define CONFIG_TEST + #include "munit/munit.h" #include "../src/config.c" #include //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 */