Update coverage report.
[ocaml-bitstring.git] / tests / 31_bitstring_concat.ml
1 (* Test concat and the bit get functions.
2  * $Id$
3  *)
4
5 let () =
6   for i = 0 to 33 do
7     for j = 0 to 33 do
8       for k = 0 to 33 do
9         let bits =
10           Bitstring.concat [
11             Bitstring.ones_bitstring i;
12             Bitstring.zeroes_bitstring j;
13             Bitstring.ones_bitstring k
14           ] in
15         assert (Bitstring.bitstring_length bits = i+j+k);
16         for n = 0 to i-1 do
17           assert (Bitstring.is_set bits n)
18         done;
19         for n = i to i+j-1 do
20           assert (Bitstring.is_clear bits n)
21         done;
22         for n = i+j to i+j+k-1 do
23           assert (Bitstring.is_set bits n)
24         done
25       done
26     done
27   done