diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2023-06-19 12:11:36 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2023-06-20 14:26:09 -0400 |
commit | 90ded13e589b0089167ef25ca3d26be599dfec9b (patch) | |
tree | d5a007948587f62fff62c851ddd3886b5a5e78ed /tests/bfstd.c | |
parent | 9ceb2b27577f1be3f30edb40a45117066fc78c51 (diff) | |
download | bfs-90ded13e589b0089167ef25ca3d26be599dfec9b.tar.xz |
alloc: New header for memory allocation utilities
Diffstat (limited to 'tests/bfstd.c')
-rw-r--r-- | tests/bfstd.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/tests/bfstd.c b/tests/bfstd.c index 7fea9b5..fa854a8 100644 --- a/tests/bfstd.c +++ b/tests/bfstd.c @@ -24,17 +24,6 @@ static void check_base_dir(const char *path, const char *dir, const char *base) } int main(void) { - // Check flex_sizeof() - struct flexible { - alignas(64) int foo; - int bar[]; - }; - 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"); check_base_dir("usr/", ".", "usr"); @@ -46,4 +35,6 @@ int main(void) { check_base_dir("/usr/lib", "/usr", "lib"); check_base_dir("//usr//lib//", "//usr", "lib"); check_base_dir("/home//dwc//test", "/home//dwc", "test"); + + return EXIT_SUCCESS; } |