From 28c3c217cc70cf2eba41dbca2954c5d8382802d7 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Thu, 14 Aug 2014 19:30:54 +0200 Subject: tests: Factor out srdtest_setup() / srdtest_teardown(). --- tests/check_inst.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'tests/check_inst.c') diff --git a/tests/check_inst.c b/tests/check_inst.c index fccd2e1..fe7e1f9 100644 --- a/tests/check_inst.c +++ b/tests/check_inst.c @@ -23,16 +23,6 @@ #include #include "lib.h" -static void setup(void) -{ - /* Silence libsigrokdecode while the unit tests run. */ - srd_log_loglevel_set(SRD_LOG_NONE); -} - -static void teardown(void) -{ -} - /* * Check whether srd_inst_new() works. * If it returns NULL (or segfaults) this test will fail. @@ -158,13 +148,13 @@ Suite *suite_inst(void) s = suite_create("inst"); tc = tcase_create("new"); - tcase_add_checked_fixture(tc, setup, teardown); + tcase_add_checked_fixture(tc, srdtest_setup, srdtest_teardown); tcase_add_test(tc, test_inst_new); tcase_add_test(tc, test_inst_new_multiple); suite_add_tcase(s, tc); tc = tcase_create("option"); - tcase_add_checked_fixture(tc, setup, teardown); + tcase_add_checked_fixture(tc, srdtest_setup, srdtest_teardown); tcase_add_test(tc, test_inst_option_set_empty); tcase_add_test(tc, test_inst_option_set_bogus); suite_add_tcase(s, tc); -- cgit v1.2.3-70-g09d2