summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-10-28 18:07:20 +0100
committerLennart Poettering <lennart@poettering.net>2014-10-28 18:07:23 +0100
commit288c0991d5a0b24084e27efff4bca80170ea4456 (patch)
tree6b815ff95c7244b5a3c63c907ae20d499e1b63fa /src/shared
parent1378a3b5a10444e6c9a17084c65032b4e1061c8e (diff)
test: use assert_se() when testing tables so that we get a useful error when something fails
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/test-tables.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/shared/test-tables.h b/src/shared/test-tables.h
index 3ac8729d74..74f1716fe0 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));
}
}