about summary refs log tree commit diff
path: root/lib/tests/misc.nix
diff options
context:
space:
mode:
authorSilvan Mosberger <silvan.mosberger@tweag.io>2023-09-22 12:24:27 +0200
committerSilvan Mosberger <silvan.mosberger@tweag.io>2023-09-27 02:43:59 +0200
commitdd72ff27f783ff62c93d78f625633a09c4658344 (patch)
tree979d002282d17307c21e5ddf04f53b66771d701b /lib/tests/misc.nix
parent3b6169f87be45c77ec4b56d118a5e2c718ff3f2b (diff)
downloadnixlib-dd72ff27f783ff62c93d78f625633a09c4658344.tar
nixlib-dd72ff27f783ff62c93d78f625633a09c4658344.tar.gz
nixlib-dd72ff27f783ff62c93d78f625633a09c4658344.tar.bz2
nixlib-dd72ff27f783ff62c93d78f625633a09c4658344.tar.lz
nixlib-dd72ff27f783ff62c93d78f625633a09c4658344.tar.xz
nixlib-dd72ff27f783ff62c93d78f625633a09c4658344.tar.zst
nixlib-dd72ff27f783ff62c93d78f625633a09c4658344.zip
lib.attrsets.foldlAttrs: Make stricter
See the parent commit for the same change to lib.lists.foldl'
Diffstat (limited to 'lib/tests/misc.nix')
-rw-r--r--lib/tests/misc.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix
index d40d92049880..ec306acbb765 100644
--- a/lib/tests/misc.nix
+++ b/lib/tests/misc.nix
@@ -740,7 +740,7 @@ runTests {
       # should just return the initial value
       emptySet = foldlAttrs (throw "function not needed") 123 { };
       # should just evaluate to the last value
-      accNotNeeded = foldlAttrs (_acc: _name: v: v) (throw "accumulator not needed") { z = 3; a = 2; };
+      valuesNotNeeded = foldlAttrs (acc: _name: _v: acc) 3 { z = throw "value z not needed"; a = throw "value a not needed"; };
       # the accumulator doesnt have to be an attrset it can be as trivial as being just a number or string
       trivialAcc = foldlAttrs (acc: _name: v: acc * 10 + v) 1 { z = 1; a = 2; };
     };
@@ -750,7 +750,7 @@ runTests {
         names = [ "bar" "foo" ];
       };
       emptySet = 123;
-      accNotNeeded = 3;
+      valuesNotNeeded = 3;
       trivialAcc = 121;
     };
   };