tvl-depot/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-all.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
490 B
Nix
Raw Normal View History

[
(builtins.all (x: x) [ ])
(builtins.all (x: x) [ true true true ])
(builtins.all (x: x) [ false false false ])
(builtins.all (x: x) [ true true false ])
(builtins.all (x: x) [ false true true ])
# evaluation should short-circuit
(builtins.all (x: x) [ true false (builtins.abort "should be unreachable") ])
# arbitrary functions supported
(builtins.all (x: x * 2 == 42) [ ])
(builtins.all (x: x * 2 == 42) [ 21 21 21 ])
(builtins.all (x: x * 2 == 42) [ 1 2 3 ])
]