about summary refs log tree commit diff
path: root/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-all.nix
blob: 12d62632dd6cccb872594b447bee492a2c94678f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[
  (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 ])
]