diff options
author | Ryan Lahfa <tvl@lahfa.xyz> | 2024-01-14T03·07+0100 |
---|---|---|
committer | raitobezarius <tvl@lahfa.xyz> | 2024-02-10T15·34+0000 |
commit | 7b1632ec71cc56dffa6eeca90fdf122331a5065f (patch) | |
tree | 8ea337d873f25b66881f51006eb1ba6db0431a75 /tvix/eval/src/tests/tvix_tests/eval-okay-builtins-foldl-propagate-catchable.nix | |
parent | d10c5309bcb483776c599a7576f57142dc7644b2 (diff) |
feat(tvix/eval): strengthen significantly catchable test suite r/7495
Adds a bunch (notably certain overlapping) tests for catchable situations. This should cover many scenarios, argument is catchable, element in argument is catchable, function returns catchable in the middle of the processing, etc. Co-authored-by: Aspen Smith <root@gws.fyi> Change-Id: Icd722cf8dbc91a24f45cd540a328711e5826f76c Reviewed-on: https://cl.tvl.fyi/c/depot/+/10621 Reviewed-by: aspen <root@gws.fyi> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests/eval-okay-builtins-foldl-propagate-catchable.nix')
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-builtins-foldl-propagate-catchable.nix | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-foldl-propagate-catchable.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-foldl-propagate-catchable.nix new file mode 100644 index 000000000000..234c95040b67 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-foldl-propagate-catchable.nix @@ -0,0 +1,8 @@ +map (e: (builtins.tryEval e).success) [ + (builtins.foldl' (builtins.throw "a") {} [ {} {} {} ]) + (builtins.foldl' (x: y: x // y) {} (builtins.throw "b")) + (builtins.foldl' (_: _: builtins.throw "x") {} [ {} ]) + (builtins.foldl' (x: y: x // y) (builtins.throw "x") [ {} ]) + (builtins.foldl' (x: y: x // y) {} [ {} { a = builtins.throw "z"; } {} ]) + (builtins.foldl' (x: y: x // y) {} [ {} { b = 3; a = builtins.throw "u"; } {} ]) +] |