-t_map(_Cfg) ->
- F = fun (N) -> N + 1 end,
- Xs = lists:seq(1, 5010),
- Ys = lists:map(F, Xs),
- Ys = hope_list:map(Xs, F),
- [] = hope_list:map([], F).
-
-t_unique_preserve_order(_Cfg) ->
- ?PROPTEST(prop_unique_preserve_order).
+t_manual_divide(_Cfg) ->
+ try
+ hope_list:divide([a, b, c], -1)
+ catch
+ error:hope_list__divide__size_must_be_a_positive_integer -> ok
+ end,
+ try
+ hope_list:divide([a, b, c], 0)
+ catch
+ error:hope_list__divide__size_must_be_a_positive_integer -> ok
+ end,
+ [[c], [b], [a]] = hope_list:divide([a, b, c], 1),
+ [[c], [b, a]] = hope_list:divide([a, b, c], 2),
+ [[c, b, a]] = hope_list:divide([a, b, c], 3),
+ [[c, b, a]] = hope_list:divide([a, b, c], 4),
+ [[c, b, a]] = hope_list:divide([a, b, c], 5),
+ try
+ hope_list:divide([], 0)
+ catch
+ error:hope_list__divide__size_must_be_a_positive_integer -> ok
+ end,
+ try
+ hope_list:divide([], -1)
+ catch
+ error:hope_list__divide__size_must_be_a_positive_integer -> ok
+ end,
+ [[f, e], [d, c], [b, a]] = hope_list:divide([a, b, c, d, e, f], 2),
+ [[f, e, d], [c, b, a]] = hope_list:divide([a, b, c, d, e, f], 3).