diff options
author | 2014-10-28 18:07:20 +0100 | |
---|---|---|
committer | 2014-10-28 18:07:23 +0100 | |
commit | 288c0991d5a0b24084e27efff4bca80170ea4456 (patch) | |
tree | 6b815ff95c7244b5a3c63c907ae20d499e1b63fa | |
parent | service: add missing state table entry (diff) | |
download | systemd-288c0991d5a0b24084e27efff4bca80170ea4456.tar.gz systemd-288c0991d5a0b24084e27efff4bca80170ea4456.tar.bz2 systemd-288c0991d5a0b24084e27efff4bca80170ea4456.zip |
test: use assert_se() when testing tables so that we get a useful error when something fails
-rw-r--r-- | src/shared/test-tables.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/shared/test-tables.h b/src/shared/test-tables.h index 3ac8729d7..74f1716fe 100644 --- a/src/shared/test-tables.h +++ b/src/shared/test-tables.h @@ -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)); } } |