summaryrefslogtreecommitdiffstats
path: root/src/resolve/test-resolved-packet.c
diff options
context:
space:
mode:
authorJan Janssen <medhefgo@web.de>2022-03-14 10:37:27 +0100
committerJan Janssen <medhefgo@web.de>2022-03-16 14:50:12 +0100
commit68da8adf54d7ab88610c161a1c7dd2819eb96886 (patch)
tree0a1f175eb14cb1e984c63f309641cf17df416e66 /src/resolve/test-resolved-packet.c
parentupdate TODO (diff)
downloadsystemd-68da8adf54d7ab88610c161a1c7dd2819eb96886.tar.xz
systemd-68da8adf54d7ab88610c161a1c7dd2819eb96886.zip
test: Use TEST macros in more places
Diffstat (limited to 'src/resolve/test-resolved-packet.c')
-rw-r--r--src/resolve/test-resolved-packet.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/resolve/test-resolved-packet.c b/src/resolve/test-resolved-packet.c
index cd93b1c23d..dd8c969b14 100644
--- a/src/resolve/test-resolved-packet.c
+++ b/src/resolve/test-resolved-packet.c
@@ -4,7 +4,7 @@
#include "resolved-dns-packet.h"
#include "tests.h"
-static void test_dns_packet_new(void) {
+TEST(dns_packet_new) {
size_t i;
_cleanup_(dns_packet_unrefp) DnsPacket *p2 = NULL;
@@ -23,10 +23,4 @@ static void test_dns_packet_new(void) {
assert_se(dns_packet_new(&p2, DNS_PROTOCOL_DNS, DNS_PACKET_SIZE_MAX + 1, DNS_PACKET_SIZE_MAX) == -EFBIG);
}
-int main(int argc, char **argv) {
- test_setup_logging(LOG_DEBUG);
-
- test_dns_packet_new();
-
- return 0;
-}
+DEFINE_TEST_MAIN(LOG_DEBUG);