This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
10
unikernel/duniverse/base/test/test_fn.ml
Normal file
10
unikernel/duniverse/base/test/test_fn.ml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
open! Import
|
||||
open! Fn
|
||||
|
||||
(* enforce that we're testing [Fn.(|>)] and not ppx_pipebang. *)
|
||||
let (_ : 'a -> ('a -> 'b) -> 'b) = ( |> )
|
||||
let%test _ = 1 |> fun x -> x = 1
|
||||
let%test _ = 1 |> fun x -> x + 1 |> fun y -> y = 2
|
||||
let%test _ = 0 = apply_n_times ~n:0 (fun _ -> assert false) 0
|
||||
let%test _ = 0 = apply_n_times ~n:(-3) (fun _ -> assert false) 0
|
||||
let%test _ = 10 = apply_n_times ~n:10 (( + ) 1) 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue