chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1378a3b
)
test: use assert_se() when testing tables so that we get a useful error when somethin...
author
Lennart Poettering
<lennart@poettering.net>
Tue, 28 Oct 2014 17:07:20 +0000
(18:07 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 28 Oct 2014 17:07:23 +0000
(18:07 +0100)
src/shared/test-tables.h
patch
|
blob
|
history
diff --git
a/src/shared/test-tables.h
b/src/shared/test-tables.h
index 3ac8729d749af090c0bdd5da9a91166a4c14ad3c..74f1716fe08ee9af42fc7bd1c6f7bdcd1ceef840 100644
(file)
--- 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));
}
}