4 module ListMonoid = struct
10 module StrMonoid = struct
16 module W = Writer.Make(ListMonoid)
17 module W2 = Writer.Make(StrMonoid)
20 let _ = begin "writer.ml" >::: [
21 "tell" >:: begin fun () ->
23 perform with module W in begin
28 assert_equal () @@ fst @@ runWriter m;
29 assert_equal ["hi"; "ho"] @@ snd @@ runWriter m
31 "with_str" >:: begin fun () ->
34 perform with module W2 in begin
39 assert_equal () @@ fst @@ runWriter m;
40 assert_equal "hiho" @@ snd @@ runWriter m
42 ] end +> run_test_tt_main