1 #include "ntdb-source.h"
2 #include "tap-interface.h"
4 static unsigned int dumb_fls(uint64_t num
)
8 for (i
= 63; i
>= 0; i
--) {
15 int main(int argc
, char *argv
[])
19 plan_tests(64 * 64 + 2);
22 ok1(dumb_fls(0) == 0);
24 for (i
= 0; i
< 64; i
++) {
25 for (j
= 0; j
< 64; j
++) {
26 uint64_t val
= (1ULL << i
) | (1ULL << j
);
27 ok(fls64(val
) == dumb_fls(val
),
28 "%llu -> %u should be %u", (long long)val
,
29 fls64(val
), dumb_fls(val
));