diff options
author | William Carroll <wpcarro@gmail.com> | 2022-09-06T21·55-0700 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2022-09-22T17·42+0000 |
commit | 890bbf9b1fba98ac9791eaacaf594492e7ead662 (patch) | |
tree | dbb47ab0ab3a09885a5c6a12648696b7b30e2f47 /tvix/eval/src/tests/tvix_tests/eval-okay-builtins-lessThan.nix | |
parent | 9e16d708092e88d0013ef96ef9a33ec28b2c46ea (diff) |
feat(tvix/eval): Support builtins.lessThan r/4955
Extend and export the `cmp_op`, and this becomes trivial. Change-Id: I9c93fa4db0f5a1fc8b56928ea144676f79247de1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6557 Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests/eval-okay-builtins-lessThan.nix')
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-builtins-lessThan.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-lessThan.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-lessThan.nix new file mode 100644 index 000000000000..cd2d0c209c3a --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-lessThan.nix @@ -0,0 +1,15 @@ +[ + (builtins.lessThan 2 3) + (builtins.lessThan 2.0 3) + (builtins.lessThan 2 3.0) + (builtins.lessThan 2.0 3.0) + (builtins.lessThan 3 2) + (builtins.lessThan 3.0 2) + (builtins.lessThan 3 2.0) + (builtins.lessThan 3.0 2.0) + (builtins.lessThan 10 (builtins.add 9 2)) + (builtins.lessThan (builtins.add 9 1) 11) + (builtins.lessThan (builtins.add 9 1) (builtins.add 9 2)) + (builtins.lessThan "a" "b") + (builtins.lessThan "b" "a") +] |