From 2ce6f3f0a29f4a9af829b2cb2424761b2cf5b0d9 Mon Sep 17 00:00:00 2001 From: sanine Date: Sun, 24 Apr 2022 12:53:50 -0500 Subject: make lily_init() obsolete --- lily-test.c | 11 +---------- lily-test.h | 1 - tests/main.c | 2 -- 3 files changed, 1 insertion(+), 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 #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); -- cgit v1.2.1