From 1b54e631617a7205ed59dcb1fd90fbc3110a1394 Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Mon, 27 Feb 2017 13:30:34 +0100 Subject: [PATCH] tests: remove GU_REGISTER_TEST() This macro is never used directly. Just make it a part of GU_DEFINE_TEST(). Signed-off-by: Bartosz Golaszewski --- tests/unit/gpiod-unit.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tests/unit/gpiod-unit.h b/tests/unit/gpiod-unit.h index 8d86c70..9bae567 100644 --- a/tests/unit/gpiod-unit.h +++ b/tests/unit/gpiod-unit.h @@ -41,13 +41,6 @@ struct _gu_test { void _gu_register_test(struct _gu_test *test); void _gu_test_failed(const char *fmt, ...) GU_PRINTF(1, 2); -#define GU_REGISTER_TEST(test) \ - static GU_INIT void _gu_register_##test(void) \ - { \ - _gu_register_test(&test); \ - } \ - static int _gu_##test##_sentinel GU_UNUSED - /* * This macro should be used for code brevity instead of manually declaring * the gu_test structure. @@ -72,7 +65,11 @@ void _gu_test_failed(const char *fmt, ...) GU_PRINTF(1, 2); .named_lines = _a_named_lines, \ }, \ }; \ - GU_REGISTER_TEST(_##_a_func##_descr) + static GU_INIT void _gu_register_##_a_func##_test(void) \ + { \ + _gu_register_test(&_##_a_func##_descr); \ + } \ + static int _gu_##_a_func##_sentinel GU_UNUSED enum { GU_LINES_UNNAMED = false, -- 2.30.2