testAllTrue helper function

svn path=/nixpkgs/trunk/; revision=18540
This commit is contained in:
Marc Weber 2009-11-22 21:28:46 +00:00
parent 976def943b
commit 10e806bcef

View file

@ -71,7 +71,9 @@ rec {
then [ { inherit name; expected = test.expected; result = test.expr; } ]
else [] ) tests));
# create a test assuming that list elements are true
# usage: { testX = allTrue [ true ]; }
testAllTrue = expr : { inherit expr; expected = map (x: true) expr; };
# evaluate everything once so that errors will occur earlier
# hacky: traverse attrs by adding a dummy