Data_encoding: test catching of invalid encodings

This commit is contained in:
Raphaël Proust 2018-05-23 13:18:18 +08:00 committed by Benjamin Canou
parent 00d596e9c2
commit 8b5bce50cf

View File

@ -22,4 +22,9 @@ let tests = [
test "duplicated_tag" (fun () -> test "duplicated_tag" (fun () ->
union [ case (Tag 0) empty (fun () -> None) (fun () -> ()) ; union [ case (Tag 0) empty (fun () -> None) (fun () -> ()) ;
case (Tag 0) empty (fun () -> None) (fun () -> ()) ]) ; case (Tag 0) empty (fun () -> None) (fun () -> ()) ]) ;
test "fixed_negative_size" (fun () -> Fixed.string (~- 1)) ;
test "fixed_null_size" (fun () -> Fixed.bytes 0) ;
test "array_null_size" (fun () -> Variable.list empty) ;
test "list_null_size" (fun () -> Variable.list null) ;
test "zeroable_in_list" (fun () -> list (obj1 (varopt "x" int8))) ;
] ]