about summary refs log tree commit diff
path: root/tvix/eval/src
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2023-12-12T06·57-0800
committerclbot <clbot@tvl.fyi>2023-12-12T15·49+0000
commit1b2a1892cbd13357c3987d74643d659587b2dc54 (patch)
tree8c5004b91e6a8caf7c2dcbb43d40f318c76f9927 /tvix/eval/src
parent289663cac4c1acd75ea850f1622ec8fee9eeff44 (diff)
test(tvix/eval): testing catchable for inequality r/7183
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 <tazjin@tvl.su>
Autosubmit: Adam Joseph <adam@westernsemico.com>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src')
-rw-r--r--tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-catchable-in-inequality.exp1
-rw-r--r--tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-catchable-in-inequality.nix1
2 files changed, 2 insertions, 0 deletions
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 0000000000..c508d5366f
--- /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 0000000000..93836bd8fe
--- /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