aboutsummaryrefslogtreecommitdiffstats
path: root/test-variables.c
diff options
context:
space:
mode:
Diffstat (limited to 'test-variables.c')
-rw-r--r--test-variables.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/test-variables.c b/test-variables.c
index 3d5b7c5..0049aad 100644
--- a/test-variables.c
+++ b/test-variables.c
@@ -64,20 +64,27 @@ main(void)
for (i = 0; i < count; i++) {
const char *prefix = " ";
+ uint64_t any = 0;
assert(vars[i].name);
assert(*vars[i].name);
assert(vars[i].classes);
- assert(!(vars[i].classes[0] & 1)); /* LIBENV_END */
printf("%s:", vars[i].name);
- for (j = 0; j < ELEMSOF(class_names); j++) {
+ for (j = 0; j < nclasswords * 64; j++) {
+ any |= vars[i].classes[j / 64];
if ((vars[i].classes[j / 64] >> (j % 64)) & 1) {
+ assert(j != (size_t)LIBENV_END);
+ if (j >= ELEMSOF(class_names)) {
+ fprintf(stderr, "\033[1;31mclass name list is out of date\033[m\n");
+ return 1;
+ }
printf("%s%s", prefix, class_names[j]);
prefix = ", ";
}
}
printf("\n");
+ assert(any);
}
return 0;