mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
Compare commits
2 commits
4613aafb30
...
ab7d0fcc09
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab7d0fcc09 | ||
|
|
b55d3cfe6a |
2 changed files with 3 additions and 1 deletions
|
|
@ -101,7 +101,7 @@ let max_len_b_ = 128
|
|||
|
||||
let bytes (x : bytes) =
|
||||
let h = ref fnv_offset_basis in
|
||||
for i = 0 to min max_len_b_ (Bytes.length x) do
|
||||
for i = 0 to min max_len_b_ (Bytes.length x-1) do
|
||||
(h := Int64.(mul !h fnv_prime));
|
||||
let byte = Char.code (Bytes.unsafe_get x i) in
|
||||
h := Int64.(logxor !h (of_int byte))
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ t @@ fun () -> char 'c' >= 0;;
|
|||
t @@ fun () -> int 152352 = int 152352;;
|
||||
t @@ fun () -> list_comm int [ 1; 2 ] = list_comm int [ 2; 1 ];;
|
||||
t @@ fun () -> list_comm int [ 1; 2 ] <> list_comm int [ 2; 3 ];;
|
||||
t @@ fun () -> string "abcd" >= 0;;
|
||||
t @@ fun () -> string "abc" <> string "abcd";;
|
||||
|
||||
q Q.int (fun i ->
|
||||
Q.assume (i >= 0);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue