Skip to content

Commit 69da4f0

Browse files
committed
Add Bytes.{g,s}et_{,u}int8 bindings to Lin Bytes test
1 parent 5aa7fc2 commit 69da4f0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/bytes/lin_tests.ml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,15 @@ module BConf = struct
2929
val_ "Bytes.contains" Bytes.contains (t @-> char @-> returning_or_exc bool);
3030
val_ "Bytes.contains_from" Bytes.contains_from (t @-> int @-> char @-> returning_or_exc bool);
3131
val_ "Bytes.rcontains_from" Bytes.rcontains_from (t @-> int @-> char @-> returning_or_exc bool);
32+
(* UTF codecs and validations *)
3233
val_ "Bytes.is_valid_utf_8" Bytes.is_valid_utf_8 (t @-> returning bool);
3334
val_ "Bytes.is_valid_utf_16be" Bytes.is_valid_utf_16be (t @-> returning bool);
3435
val_ "Bytes.is_valid_utf_16le" Bytes.is_valid_utf_16le (t @-> returning bool);
36+
(* Binary encoding/decoding of integers *)
37+
val_ "Bytes.get_uint8" Bytes.get_uint8 (t @-> int @-> returning_or_exc int);
38+
val_ "Bytes.get_int8" Bytes.get_int8 (t @-> int @-> returning_or_exc int);
39+
val_ "Bytes.set_uint8" Bytes.set_uint8 (t @-> int @-> int @-> returning_or_exc unit);
40+
val_ "Bytes.set_int8" Bytes.set_int8 (t @-> int @-> int @-> returning_or_exc unit);
3541
]
3642
end
3743

0 commit comments

Comments
 (0)