mirror of
https://github.com/systemd/systemd.git
synced 2026-11-06 21:36:59 +00:00
test-gunicode: convert to new ASSERT macros
Replace assert_se() with the typed ASSERT_* macros throughout, so that a failing assertion logs the values involved.
This commit is contained in:
1 parent
549ba70b6d
commit
d096fedc55
1 file changed
+4
-4
@@ -12,15 +12,15 @@ TEST(unichar_iswide) {
|
||||
for (const char *narrow = "abX_…ąęµ!" "😼😿🙀😸😻"; *narrow; narrow += r) {
|
||||
r = utf8_encoded_to_unichar(narrow, &c);
|
||||
bool w = unichar_iswide(c);
|
||||
assert_se(r > 0);
|
||||
assert_se(!w);
|
||||
ASSERT_OK_POSITIVE(r);
|
||||
ASSERT_FALSE(w);
|
||||
}
|
||||
|
||||
for (const char *wide = "🐱/¥"; *wide; wide += r) {
|
||||
r = utf8_encoded_to_unichar(wide, &c);
|
||||
bool w = unichar_iswide(c);
|
||||
assert_se(r > 0);
|
||||
assert_se(w);
|
||||
ASSERT_OK_POSITIVE(r);
|
||||
ASSERT_TRUE(w);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user