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.
This commit is contained in:
Yaping Li
2025-06-28 03:53:12 +09:00
committed by GitHub
parent 77de0a0e26
commit 7a58b45017
+3 -3
View File
@@ -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;