15 let bits1 = Bitstring.ones_bitstring i
16 and bits2 = Bitstring.ones_bitstring j in
17 let r = Bitstring.compare bits1 bits2 in
18 if sgn r <> sgn (compare i j) then (
19 eprintf "ones compare failed %d %d %d\n" i j r;
26 let bits1 = Bitstring.zeroes_bitstring i
27 and bits2 = Bitstring.zeroes_bitstring j in
28 let r = Bitstring.compare bits1 bits2 in
29 if sgn r <> sgn (compare i j) then (
30 eprintf "zeroes compare failed %d %d %d\n" i j r;
37 let bits1 = Bitstring.make_bitstring i '\x55'
38 and bits2 = Bitstring.make_bitstring j '\x55' in
39 let r = Bitstring.compare bits1 bits2 in
40 if sgn r <> sgn (compare i j) then (
41 eprintf "x55 compare failed %d %d %d\n" i j r;
48 let bits1 = Bitstring.make_bitstring i '\x55' in
49 let bits2 = Bitstring.make_bitstring i '\x55' in
50 let bits2 = Bitstring.concat [Bitstring.zeroes_bitstring j; bits2] in
51 assert (Bitstring.bitstring_length bits2 = j+i);
52 let bits2 = Bitstring.dropbits j bits2 in
53 assert (Bitstring.bitstring_length bits2 = i);
54 let r = Bitstring.compare bits1 bits2 in
56 eprintf "x55 non-aligned compare failed %d %d %d\n" i j r;