summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-04-24 12:53:50 -0500
committersanine <sanine.not@pm.me>2022-04-24 12:53:50 -0500
commit2ce6f3f0a29f4a9af829b2cb2424761b2cf5b0d9 (patch)
tree770397b873c640d9dd82941d69665e0cb29f7e3b
parent10e56d32931ad26d79ac726a36366664cf4d8b63 (diff)
make lily_init() obsolete
-rw-r--r--lily-test.c11
-rw-r--r--lily-test.h1
-rw-r--r--tests/main.c2
3 files changed, 1 insertions, 13 deletions
diff --git a/lily-test.c b/lily-test.c
index 9711399..32dc075 100644
--- a/lily-test.c
+++ b/lily-test.c
@@ -4,16 +4,7 @@
#include <string.h>
#include "lily-test.h"
-struct lily_globals_t _lily_globals;
-
-
-/* set the initial values of lily globals */
-void lily_init()
-{
- _lily_globals.error_msg_len = 0;
- _lily_globals.error_msg = NULL;
- _lily_globals.error_location = "";
-}
+struct lily_globals_t _lily_globals = { {0}, 0, NULL, "" };
/* run an individual test */
void _lily_run_test(const char *name, lily_test_t test)
diff --git a/lily-test.h b/lily-test.h
index 7270272..b9a57f7 100644
--- a/lily-test.h
+++ b/lily-test.h
@@ -24,7 +24,6 @@ struct lily_globals_t {
};
extern struct lily_globals_t _lily_globals;
-void lily_init();
typedef void (*lily_test_t)(void);
diff --git a/tests/main.c b/tests/main.c
index 1306502..f3f1f06 100644
--- a/tests/main.c
+++ b/tests/main.c
@@ -8,8 +8,6 @@
int main()
{
- lily_init();
-
run_test(test_LILY_LOCATION);
run_test(test_assert_msg);
run_test(test_assert_true);