diff regexParser/test/searchBit.cc @ 202:39ca25ed0607

add searchBit test
author Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
date Sat, 26 Dec 2015 19:49:34 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/regexParser/test/searchBit.cc	Sat Dec 26 19:49:34 2015 +0900
@@ -0,0 +1,14 @@
+#include <stdio.h>
+#include "regexParser.h"
+#include "bitVector.h"
+
+int main () {
+    unsigned long x1 = 0x1000011;
+    BitVector bi = createBitVector(0);
+    bi.bitContainer = x1;
+    printf("%lx pos %d\n",bi.bitContainer,searchBit(bi));
+    unsigned long x2 = 0x1000010;
+    bi.bitContainer = x2;
+    printf("%lx pos %d\n",bi.bitContainer,searchBit(bi));
+    return 1;
+}