diff options
author | Jan Janssen <medhefgo@web.de> | 2022-03-14 10:37:27 +0100 |
---|---|---|
committer | Jan Janssen <medhefgo@web.de> | 2022-03-16 14:50:12 +0100 |
commit | 68da8adf54d7ab88610c161a1c7dd2819eb96886 (patch) | |
tree | 0a1f175eb14cb1e984c63f309641cf17df416e66 /src/libsystemd-network/test-ndisc-rs.c | |
parent | update TODO (diff) | |
download | systemd-68da8adf54d7ab88610c161a1c7dd2819eb96886.tar.xz systemd-68da8adf54d7ab88610c161a1c7dd2819eb96886.zip |
test: Use TEST macros in more places
Diffstat (limited to 'src/libsystemd-network/test-ndisc-rs.c')
-rw-r--r-- | src/libsystemd-network/test-ndisc-rs.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/libsystemd-network/test-ndisc-rs.c b/src/libsystemd-network/test-ndisc-rs.c index 10915e1d4c..2c27d12b09 100644 --- a/src/libsystemd-network/test-ndisc-rs.c +++ b/src/libsystemd-network/test-ndisc-rs.c @@ -257,13 +257,10 @@ static void test_callback(sd_ndisc *nd, sd_ndisc_event_t event, sd_ndisc_router sd_event_exit(e, 0); } -static void test_rs(void) { +TEST(rs) { sd_event *e; sd_ndisc *nd; - if (verbose) - printf("* %s\n", __func__); - send_ra_function = send_ra; assert_se(sd_event_new(&e) >= 0); @@ -347,13 +344,10 @@ static int test_timeout_value(uint8_t flags) { return 0; } -static void test_timeout(void) { +TEST(timeout) { sd_event *e; sd_ndisc *nd; - if (verbose) - printf("* %s\n", __func__); - send_ra_function = test_timeout_value; assert_se(sd_event_new(&e) >= 0); @@ -381,12 +375,4 @@ static void test_timeout(void) { sd_event_unref(e); } -int main(int argc, char *argv[]) { - - test_setup_logging(LOG_DEBUG); - - test_rs(); - test_timeout(); - - return 0; -} +DEFINE_TEST_MAIN(LOG_DEBUG); |