diff options
author | volth <volth@webmaster.ms> | 2018-06-10 19:25:48 +0000 |
---|---|---|
committer | xeji <36407913+xeji@users.noreply.github.com> | 2018-06-10 21:25:48 +0200 |
commit | 3c2bbe217c4bbc67cfdf3912317d5a19b3994f69 (patch) | |
tree | 49b7e480abe63303733e6f284fe350bb4acb74ae /lib/tests | |
parent | e544e4f564f69c89fc38fbd161648084b4f57c4f (diff) |
lib: bitAnd, bitOr, bitXor (bitsize-agnostic fallback function) (#41491)
* lib: bitAnd, bitOr, bitXor
* lib: test for bitAnd, bitOr, bitXor
* lib: bitsize-agnostic zipIntBits
* lib: bitNot
* lib: bitNot
Diffstat (limited to 'lib/tests')
-rw-r--r-- | lib/tests/misc.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index c683df7d7ca3..eab20d0f14dc 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -45,6 +45,21 @@ runTests { expected = true; }; + testBitAnd = { + expr = (bitAnd 3 10); + expected = 2; + }; + + testBitOr = { + expr = (bitOr 3 10); + expected = 11; + }; + + testBitXor = { + expr = (bitXor 3 10); + expected = 9; + }; + # STRINGS testConcatMapStrings = { |