mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
Apply ocamlformat on t_array.ml
This commit is contained in:
parent
492484a9a2
commit
d2bdee097e
1 changed files with 4 additions and 8 deletions
|
|
@ -139,22 +139,18 @@ t @@ fun () -> rev [| 1; 2; 3 |] = [| 3; 2; 1 |];;
|
||||||
t @@ fun () -> rev [| 1; 2 |] = [| 2; 1 |];;
|
t @@ fun () -> rev [| 1; 2 |] = [| 2; 1 |];;
|
||||||
t @@ fun () -> rev [||] = [||];;
|
t @@ fun () -> rev [||] = [||];;
|
||||||
q Q.(array small_int) (fun a -> mem 1 a = Array.mem 1 a);;
|
q Q.(array small_int) (fun a -> mem 1 a = Array.mem 1 a);;
|
||||||
|
|
||||||
eq (Some 3) (max Stdlib.compare [| 1; 2; 3 |]);;
|
eq (Some 3) (max Stdlib.compare [| 1; 2; 3 |]);;
|
||||||
eq (Some 4) (max Stdlib.compare [| 4; -1; 2; 3 |]);;
|
eq (Some 4) (max Stdlib.compare [| 4; -1; 2; 3 |]);;
|
||||||
eq (None) (max Stdlib.compare [||]);;
|
eq None (max Stdlib.compare [||]);;
|
||||||
|
|
||||||
eq (Some 2) (argmax Stdlib.compare [| 1; 2; 3 |]);;
|
eq (Some 2) (argmax Stdlib.compare [| 1; 2; 3 |]);;
|
||||||
eq (Some 0) (argmax Stdlib.compare [| 4; -1; 2; 3 |]);;
|
eq (Some 0) (argmax Stdlib.compare [| 4; -1; 2; 3 |]);;
|
||||||
eq (None) (argmax Stdlib.compare [||]);;
|
eq None (argmax Stdlib.compare [||]);;
|
||||||
|
|
||||||
eq (Some 1) (min Stdlib.compare [| 1; 2; 3 |]);;
|
eq (Some 1) (min Stdlib.compare [| 1; 2; 3 |]);;
|
||||||
eq (Some ~-1) (min Stdlib.compare [| 4; -1; 2; 3 |]);;
|
eq (Some ~-1) (min Stdlib.compare [| 4; -1; 2; 3 |]);;
|
||||||
eq (None) (min Stdlib.compare [||]);;
|
eq None (min Stdlib.compare [||]);;
|
||||||
|
|
||||||
eq (Some 0) (argmin Stdlib.compare [| 1; 2; 3 |]);;
|
eq (Some 0) (argmin Stdlib.compare [| 1; 2; 3 |]);;
|
||||||
eq (Some 1) (argmin Stdlib.compare [| 4; -1; 2; 3 |]);;
|
eq (Some 1) (argmin Stdlib.compare [| 4; -1; 2; 3 |]);;
|
||||||
eq (None) (argmin Stdlib.compare [||]);;
|
eq None (argmin Stdlib.compare [||]);;
|
||||||
|
|
||||||
t @@ fun () ->
|
t @@ fun () ->
|
||||||
filter_map
|
filter_map
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue