about summary refs log tree commit diff
path: root/tvix/eval/src/tests/tvix_tests/eval-okay-cmp-str-false.exp
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-08-11T08·37+0300
committertazjin <tazjin@tvl.su>2022-08-25T12·07+0000
commit4eafaae9e66c66a7765ff3854890039d7536a9b9 (patch)
tree2a2e77a1963c9e458bb38ac164e327b5d6541284 /tvix/eval/src/tests/tvix_tests/eval-okay-cmp-str-false.exp
parent5a15ee3f5dec9d3bb50283fb6219b489bdd7205d (diff)
feat(tvix/eval): implement binary comparison operators r/4478
This is accomplished by simply delegating to the Rust implementations
of (Partial)Ord and (Partial)Eq, which are implemented for Value and
underlying wrapper types to behave like they do in Nix.

To ease the implementation overhead, a new comparison operator macro
has been added to the VM module.

Incomparable types will raise a new error variant when a comparison is
attempted, containing both supplied types. This mimics the information
carried in the error thrown by C++ Nix.

Change-Id: Ia19634d69119d40722f3ca672387bc3a80096998
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6143
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests/eval-okay-cmp-str-false.exp')
-rw-r--r--tvix/eval/src/tests/tvix_tests/eval-okay-cmp-str-false.exp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-cmp-str-false.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-cmp-str-false.exp
new file mode 100644
index 000000000000..95a0e7378b5e
--- /dev/null
+++ b/tvix/eval/src/tests/tvix_tests/eval-okay-cmp-str-false.exp
@@ -0,0 +1 @@
+{ eq = false; ge = false; gt = false; le = false; lt = false; ne = false; }