diff options
Diffstat (limited to 'src/regress/lib/libc/ffs/ffs_test.c')
| -rw-r--r-- | src/regress/lib/libc/ffs/ffs_test.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/regress/lib/libc/ffs/ffs_test.c b/src/regress/lib/libc/ffs/ffs_test.c new file mode 100644 index 0000000000..bc1e5c53c2 --- /dev/null +++ b/src/regress/lib/libc/ffs/ffs_test.c | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | /* $OpenBSD: ffs_test.c,v 1.1 2020/06/26 20:16:22 naddy Exp $ */ | ||
| 2 | /* | ||
| 3 | * Written by Christian Weisgerber <naddy@openbsd.org>. | ||
| 4 | * Public domain. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <assert.h> | ||
| 8 | #include <stdint.h> | ||
| 9 | #include <string.h> | ||
| 10 | |||
| 11 | int | ||
| 12 | main(void) | ||
| 13 | { | ||
| 14 | assert(ffs(0) == 0); | ||
| 15 | assert(ffs(0x8080) == 8); | ||
| 16 | assert(ffs(INT32_MIN) == 32); | ||
| 17 | return (0); | ||
| 18 | } | ||
