X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=tests%2F30_bitbuffer.ml;h=466a8f27b062e3df9868776224832f20081f7689;hb=86502a23458f9e93c8241735649ac2edd7fbc68a;hp=e9a95f96e4e0c53c1607694d3d42c5cf56c73316;hpb=7911c11ca6a9aefa8e5398ff0f39e74aaf0ac0cb;p=ocaml-bitstring.git diff --git a/tests/30_bitbuffer.ml b/tests/30_bitbuffer.ml index e9a95f9..466a8f2 100644 --- a/tests/30_bitbuffer.ml +++ b/tests/30_bitbuffer.ml @@ -1,4 +1,4 @@ -(* Test the Bitmatch.Buffer module and string_of_bitstring in +(* Test the Bitstring.Buffer module and string_of_bitstring in * nasty non-aligned corner cases. * $Id$ *) @@ -31,20 +31,20 @@ let () = * <---------------- len bits ---------------> *) let bits = - let bits = Bitmatch.Buffer.create () in - Bitmatch.Buffer.add_bits bits str1 offset; - Bitmatch.Buffer.add_bits bits expected len; - Bitmatch.Buffer.contents bits in + let bits = Bitstring.Buffer.create () in + Bitstring.Buffer.add_bits bits str1 offset; + Bitstring.Buffer.add_bits bits expected len; + Bitstring.Buffer.contents bits in (* Create a sub bitstring corresponding to what we want to check. *) let subbits = let bits, bitoffset, bitlen = bits in (bits, bitoffset+offset, bitlen-offset) in - assert (Bitmatch.bitstring_length subbits = len); + assert (Bitstring.bitstring_length subbits = len); (* Now try to read out the substring using string_of_bitstring. *) - let actual = Bitmatch.string_of_bitstring subbits in + let actual = Bitstring.string_of_bitstring subbits in if actual <> expected then ( eprintf "MISMATCH between actual and expected, offset=%d, len=%d\n" offset len; @@ -57,9 +57,9 @@ let () = eprintf " %02x" (Char.code actual.[i]) done; eprintf "\nBITS:\n"; - Bitmatch.hexdump_bitstring stderr bits; + Bitstring.hexdump_bitstring stderr bits; eprintf "SUBBITS:\n"; - Bitmatch.hexdump_bitstring stderr subbits; + Bitstring.hexdump_bitstring stderr subbits; exit 1 ); done