lib: move assertMsg and assertOneOf to their own library file

Since the `assertOneOf` uses `lib.generators`, they are not really trivial
anymore and should go into their own library file.
This commit is contained in:
Profpatsch 2018-08-08 19:26:52 +02:00
parent 3e45b61a99
commit efdf618330
5 changed files with 53 additions and 46 deletions

View file

@ -509,7 +509,7 @@ rec {
=> 3
*/
last = list:
assert assertMsg (list != []) "lists.last: list must not be empty!";
assert lib.assertMsg (list != []) "lists.last: list must not be empty!";
elemAt list (length list - 1);
/* Return all elements but the last
@ -519,7 +519,7 @@ rec {
=> [ 1 2 ]
*/
init = list:
assert assertMsg (list != []) "lists.init: list must not be empty!";
assert lib.assertMsg (list != []) "lists.init: list must not be empty!";
take (length list - 1) list;