summaryrefslogtreecommitdiff
path: root/src/regress/lib/libc/ffs/ffs_test.c
blob: bc1e5c53c2aac9a78f35506651e77c416a257b07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*	$OpenBSD: ffs_test.c,v 1.1 2020/06/26 20:16:22 naddy Exp $ */
/*
 * Written by Christian Weisgerber <naddy@openbsd.org>.
 * Public domain.
 */

#include <assert.h>
#include <stdint.h>
#include <string.h>

int
main(void)
{
	assert(ffs(0) == 0);
	assert(ffs(0x8080) == 8);
	assert(ffs(INT32_MIN) == 32);
	return (0);
}