summaryrefslogtreecommitdiffstats
path: root/tests/bfstd.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bfstd.c')
-rw-r--r--tests/bfstd.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/bfstd.c b/tests/bfstd.c
index a986a23..1812a00 100644
--- a/tests/bfstd.c
+++ b/tests/bfstd.c
@@ -1,10 +1,9 @@
// Copyright © Tavian Barnes <tavianator@tavianator.com>
// SPDX-License-Identifier: 0BSD
-#undef NDEBUG
#include "../src/bfstd.h"
#include "../src/config.h"
-#include <assert.h>
+#include "../src/diag.h"
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
@@ -39,11 +38,11 @@ int main(void) {
alignas(64) int foo;
int bar[];
};
- assert(flex_sizeof(struct flexible, bar, 0) >= sizeof(struct flexible));
- assert(flex_sizeof(struct flexible, bar, 16) % alignof(struct flexible) == 0);
- assert(flex_sizeof(struct flexible, bar, SIZE_MAX / sizeof(int) + 1)
- == align_floor(alignof(struct flexible), SIZE_MAX));
- assert(flex_sizeof_impl(8, 16, 4, 4, 1) == 16);
+ bfs_verify(flex_sizeof(struct flexible, bar, 0) >= sizeof(struct flexible));
+ bfs_verify(flex_sizeof(struct flexible, bar, 16) % alignof(struct flexible) == 0);
+ bfs_verify(flex_sizeof(struct flexible, bar, SIZE_MAX / sizeof(int) + 1)
+ == align_floor(alignof(struct flexible), SIZE_MAX));
+ bfs_verify(flex_sizeof_impl(8, 16, 4, 4, 1) == 16);
// From man 3p basename
check_base_dir("usr", ".", "usr");