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