diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2014-08-14 19:30:54 +0200 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2014-08-14 19:30:54 +0200 |
commit | 28c3c217cc70cf2eba41dbca2954c5d8382802d7 (patch) | |
tree | 452fce7be8b41c149a8e05679c629432269bc8cb /tests/check_decoder.c | |
parent | d841d5b26f2134143fc80c9898522d13387b7cc8 (diff) | |
download | libsigrokdecode-28c3c217cc70cf2eba41dbca2954c5d8382802d7.tar.gz libsigrokdecode-28c3c217cc70cf2eba41dbca2954c5d8382802d7.zip |
tests: Factor out srdtest_setup() / srdtest_teardown().
Diffstat (limited to 'tests/check_decoder.c')
-rw-r--r-- | tests/check_decoder.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/tests/check_decoder.c b/tests/check_decoder.c index 527845f..2125992 100644 --- a/tests/check_decoder.c +++ b/tests/check_decoder.c @@ -23,16 +23,6 @@ #include <check.h> #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_decoder_load_all() works. * If it returns != SRD_OK (or segfaults) this test will fail. @@ -320,7 +310,7 @@ Suite *suite_decoder(void) s = suite_create("decoder"); tc = tcase_create("load"); - tcase_add_checked_fixture(tc, setup, teardown); + tcase_add_checked_fixture(tc, srdtest_setup, srdtest_teardown); tcase_add_test(tc, test_load_all); tcase_add_test(tc, test_load_all_no_init); tcase_add_test(tc, test_load); @@ -331,7 +321,7 @@ Suite *suite_decoder(void) suite_add_tcase(s, tc); tc = tcase_create("list"); - tcase_add_checked_fixture(tc, setup, teardown); + tcase_add_checked_fixture(tc, srdtest_setup, srdtest_teardown); tcase_add_test(tc, test_decoder_list); tcase_add_test(tc, test_decoder_list_no_load); tcase_add_test(tc, test_decoder_list_no_init); |