diff options
author | William Carroll <wpcarro@gmail.com> | 2022-09-06T05·18-0700 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2022-09-15T21·53+0000 |
commit | f859751c6a612205740698d67e083efe5cc4ee5e (patch) | |
tree | 916455711af15e1036aec44e592e78f0e991fb80 /tvix/eval/src/tests/tvix_tests/eval-okay-builtins-bitxor.nix | |
parent | 031ca653a34bd0ca7c3c3714239459d4069e6464 (diff) |
feat(tvix/eval): Support builtins.bitXor r/4869
Bitwise "exclusive-or" on integers. Change-Id: I90a0a15afb3a58662d70e82ea14e48b877476e04 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6550 Autosubmit: wpcarro <wpcarro@gmail.com> Reviewed-by: wpcarro <wpcarro@gmail.com> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests/eval-okay-builtins-bitxor.nix')
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-builtins-bitxor.nix | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-bitxor.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-bitxor.nix new file mode 100644 index 000000000000..80e363fb0748 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-bitxor.nix @@ -0,0 +1,12 @@ +[ + (builtins.bitXor 0 0) + (builtins.bitXor 1 0) + (builtins.bitXor 0 1) + (builtins.bitXor 1 1) + (builtins.bitXor 8 0) + (builtins.bitXor 0 8) + (builtins.bitXor 8 8) + (builtins.bitXor 8 (builtins.add 4 4)) + (builtins.bitXor (builtins.add 4 4) 8) + (builtins.bitXor (builtins.add 4 4) (builtins.add 4 4)) +] |