1 #include "ntdb-source.h"
2 #include "tap-interface.h"
3 #include "helprun-external-agent.h"
5 static unsigned int dumb_fls(uint64_t num)
9 for (i = 63; i >= 0; i--) {
10 if (num & (1ULL << i))
16 int main(int argc, char *argv[])
20 plan_tests(64 * 64 + 2);
23 ok1(dumb_fls(0) == 0);
25 for (i = 0; i < 64; i++) {
26 for (j = 0; j < 64; j++) {
27 uint64_t val = (1ULL << i) | (1ULL << j);
28 ok(fls64(val) == dumb_fls(val),
29 "%llu -> %u should be %u", (long long)val,
30 fls64(val), dumb_fls(val));