X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=tests%2F10_constr1.ml;h=0a149285e2beec118d386d89563a266c1150b790;hb=c1d44102b94f885df0562783711aafba9413a3fd;hp=ba7ccc8b8879dba889a67ed1ea0b164cc8cc61b8;hpb=277441c3a2a9118c5da99bac9246a912860fa210;p=ocaml-bitstring.git diff --git a/tests/10_constr1.ml b/tests/10_constr1.ml index ba7ccc8..0a14928 100644 --- a/tests/10_constr1.ml +++ b/tests/10_constr1.ml @@ -1,15 +1,15 @@ (* Test a simple constructor. - * $Id: 10_constr1.ml,v 1.1 2008-04-01 17:05:37 rjones Exp $ + * $Id: 10_constr1.ml,v 1.2 2008-04-25 11:08:43 rjones Exp $ *) -let bits = BITSTRING 0xc : 4; 0xf : 4; 0xc : 4; 0xf : 4 ;; +let bits = BITSTRING { 0xc : 4; 0xf : 4; 0xc : 4; 0xf : 4 } ;; assert (bits = Bitmatch.make_bitstring 16 '\xcf') ;; let () = bitmatch bits with - | n0 : 4; n1 : 4; n2 : 4; n3 : 4; - rest : -1 : bitstring -> + | { n0 : 4; n1 : 4; n2 : 4; n3 : 4; + rest : -1 : bitstring } -> assert (n0 = 0xc); assert (n1 = 0xf); assert (n2 = 0xc); @@ -18,5 +18,5 @@ let () = let _, off, len = rest in assert (off = 16 && len = 0) (* no further data *) - | _ -> + | { _ } -> failwith "error: did not match\n"