+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).
+