From: Yaping Li <202858510+YapingLi04@users.noreply.github.com> Date: Fri, 27 Jun 2025 18:53:12 +0000 (-0700) Subject: test-xml: migrate to new assertion macros (#37990) X-Git-Tag: v258-rc1~234 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7a58b45017c678a2907ece2676372fe6d71e365e;p=thirdparty%2Fsystemd.git test-xml: migrate to new assertion macros (#37990) We recently added a new set of assertion macros such as ASSERT_GE, ASSERT_OK, ASSERT_EQ, ... which show not only the expression that failed but also the values of the arguments of the expression. Let's use them. --- diff --git a/src/test/test-xml.c b/src/test/test-xml.c index bb9e4c49d09..b1e102441a2 100644 --- a/src/test/test-xml.c +++ b/src/test/test-xml.c @@ -16,12 +16,12 @@ static void test_one(const char *data, ...) { const char *nn; t = xml_tokenize(&data, &name, &state, NULL); - assert_se(t >= 0); + ASSERT_GE(t, 0); tt = va_arg(ap, int); - assert_se(tt >= 0); + ASSERT_GE(tt, 0); - assert_se(t == tt); + ASSERT_EQ(t, tt); if (t == XML_END) break;