From 7a58b45017c678a2907ece2676372fe6d71e365e Mon Sep 17 00:00:00 2001 From: Yaping Li <202858510+YapingLi04@users.noreply.github.com> Date: Fri, 27 Jun 2025 11:53:12 -0700 Subject: [PATCH] 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. --- src/test/test-xml.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/test-xml.c b/src/test/test-xml.c index bb9e4c49d0..b1e102441a 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;