summaryrefslogtreecommitdiff
path: root/src/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/test.c')
-rw-r--r--src/test.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test.c b/src/test.c
index e9b8ce3..fc16201 100644
--- a/src/test.c
+++ b/src/test.c
@@ -19,10 +19,23 @@
*
**************************************************************************/
+#include "common.h"
#include <stdio.h>
#include <time.h>
+static void print_bitfield(unsigned m)
+{
+ int i;
+
+ printf("%d\n", m);
+ foreach_bit(i, m)
+ printf("%d %d\n", i, 1 << i);
+}
+
int main(int argc, char *argv[])
{
+ print_bitfield(5);
+ print_bitfield(126);
+ print_bitfield(0);
return 0;
}