From 1b2a1892cbd13357c3987d74643d659587b2dc54 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 11 Dec 2023 22:57:40 -0800 Subject: test(tvix/eval): testing catchable for inequality Relates to b/347. $ /git/depot/result/bin/tvix -E '(builtins.tryEval (throw "bob" != 3)).success' note: while evaluating this Nix code --> [code]:1:1 | 1 | (builtins.tryEval (throw "bob" != 3)).success | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: while evaluating this as native code (force) --> [code]:1:1 | 1 | (builtins.tryEval (throw "bob" != 3)).success | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: while evaluating this as native code (tryEval) --> [code]:1:2 | 1 | (builtins.tryEval (throw "bob" != 3)).success | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E006]: expected value of type 'bool', but found a 'internal[catchable]' --> [code]:1:20 | 1 | (builtins.tryEval (throw "bob" != 3)).success | ^^^^^^^^^^^^^^^^ Change-Id: Ide19b3ddaf314ef310efc2fe5ac36667e43011dc Reviewed-on: https://cl.tvl.fyi/c/depot/+/10293 Reviewed-by: tazjin Autosubmit: Adam Joseph Tested-by: BuildkiteCI --- .../tests/tvix_tests/notyetpassing/eval-okay-catchable-in-inequality.exp | 1 + .../tests/tvix_tests/notyetpassing/eval-okay-catchable-in-inequality.nix | 1 + 2 files changed, 2 insertions(+) create mode 100644 tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-catchable-in-inequality.exp create mode 100644 tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-catchable-in-inequality.nix (limited to 'tvix/eval') diff --git a/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-catchable-in-inequality.exp b/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-catchable-in-inequality.exp new file mode 100644 index 000000000000..c508d5366f70 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-catchable-in-inequality.exp @@ -0,0 +1 @@ +false diff --git a/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-catchable-in-inequality.nix b/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-catchable-in-inequality.nix new file mode 100644 index 000000000000..93836bd8feeb --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-catchable-in-inequality.nix @@ -0,0 +1 @@ +(builtins.tryEval (throw "bob" != 3)).success -- cgit 1.4.1