mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-03 01:17:45 +03:00
test: use assert_se() when testing tables so that we get a useful error when something fails
This commit is contained in:
parent
1378a3b5a1
commit
288c0991d5
@ -40,10 +40,9 @@ static inline void _test_table(const char *name,
|
||||
rev = reverse("--no-such--value----");
|
||||
|
||||
printf("%s: %d → %s → %d\n", name, i, val, rev);
|
||||
if (i >= 0 && i < size ?
|
||||
sparse ? rev != i && rev != -1 : val == NULL || rev != i :
|
||||
val != NULL || rev != -1)
|
||||
exit(EXIT_FAILURE);
|
||||
assert_se(!(i >= 0 && i < size ?
|
||||
sparse ? rev != i && rev != -1 : val == NULL || rev != i :
|
||||
val != NULL || rev != -1));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user