diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-10-18 08:53:40 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-10-18 08:53:40 +0000 |
commit | d6583bb2a13f329cf0332ef2570eb8bb8fc0e39c (patch) | |
tree | ece253b876159b39c620e62b6c9b1174642e070e /regress/include/bitstring/good |
initial import of NetBSD tree
Diffstat (limited to 'regress/include/bitstring/good')
-rw-r--r-- | regress/include/bitstring/good/27 | 263 | ||||
-rw-r--r-- | regress/include/bitstring/good/32 | 303 | ||||
-rw-r--r-- | regress/include/bitstring/good/49 | 439 | ||||
-rw-r--r-- | regress/include/bitstring/good/64 | 559 | ||||
-rw-r--r-- | regress/include/bitstring/good/67 | 583 | ||||
-rw-r--r-- | regress/include/bitstring/good/8 | 111 |
6 files changed, 2258 insertions, 0 deletions
diff --git a/regress/include/bitstring/good/27 b/regress/include/bitstring/good/27 new file mode 100644 index 00000000000..55ba39e774d --- /dev/null +++ b/regress/include/bitstring/good/27 @@ -0,0 +1,263 @@ +Testing with TEST_LENGTH = 27 + +test _bit_byte, _bit_mask, and bitstr_size + i _bit_byte(i) _bit_mask(i) bitstr_size(i) + 0 0 1 0 + 1 0 2 1 + 2 0 4 1 + 3 0 8 1 + 4 0 16 1 + 5 0 32 1 + 6 0 64 1 + 7 0 128 1 + 8 1 1 1 + 9 1 2 2 + 10 1 4 2 + 11 1 8 2 + 12 1 16 2 + 13 1 32 2 + 14 1 64 2 + 15 1 128 2 + 16 2 1 2 + 17 2 2 3 + 18 2 4 3 + 19 2 8 3 + 20 2 16 3 + 21 2 32 3 + 22 2 64 3 + 23 2 128 3 + 24 3 1 3 + 25 3 2 4 + 26 3 4 4 + +test bit_alloc, clearbits, bit_ffc, bit_ffs +be: 0 -1 000000000000000000000000000 +is: 0 -1 000000000000000000000000000 + +test bit_set +be: 1 0 100100100100100100100100100 +is: 1 0 100100100100100100100100100 + +test bit_clear +be: 0 3 000100000100000100000100000 +is: 0 3 000100000100000100000100000 + +test bit_test using previous bitstring + i bit_test(i) + 0 0 + 1 0 + 2 0 + 3 8 + 4 0 + 5 0 + 6 0 + 7 0 + 8 0 + 9 2 + 10 0 + 11 0 + 12 0 + 13 0 + 14 0 + 15 128 + 16 0 + 17 0 + 18 0 + 19 0 + 20 0 + 21 32 + 22 0 + 23 0 + 24 0 + 25 0 + 26 0 + +test clearbits +be: 0 -1 000000000000000000000000000 +is: 0 -1 000000000000000000000000000 + +test bit_nset and bit_nclear +be: 0 1 011111111111111111111111110 +is: 0 1 011111111111111111111111110 +be: 0 1 010000000000000000000000010 +is: 0 1 010000000000000000000000010 +be: 0 -1 000000000000000000000000000 +is: 0 -1 000000000000000000000000000 +be: 26 0 111111111111111111111111110 +is: 26 0 111111111111111111111111110 +be: 0 -1 000000000000000000000000000 +is: 0 -1 000000000000000000000000000 + +first 1 bit should move right 1 position each line + 0 -1 0 111111111111111111111111111 + 1 0 1 011111111111111111111111111 + 2 0 2 001111111111111111111111111 + 3 0 3 000111111111111111111111111 + 4 0 4 000011111111111111111111111 + 5 0 5 000001111111111111111111111 + 6 0 6 000000111111111111111111111 + 7 0 7 000000011111111111111111111 + 8 0 8 000000001111111111111111111 + 9 0 9 000000000111111111111111111 + 10 0 10 000000000011111111111111111 + 11 0 11 000000000001111111111111111 + 12 0 12 000000000000111111111111111 + 13 0 13 000000000000011111111111111 + 14 0 14 000000000000001111111111111 + 15 0 15 000000000000000111111111111 + 16 0 16 000000000000000011111111111 + 17 0 17 000000000000000001111111111 + 18 0 18 000000000000000000111111111 + 19 0 19 000000000000000000011111111 + 20 0 20 000000000000000000001111111 + 21 0 21 000000000000000000000111111 + 22 0 22 000000000000000000000011111 + 23 0 23 000000000000000000000001111 + 24 0 24 000000000000000000000000111 + 25 0 25 000000000000000000000000011 + 26 0 26 000000000000000000000000001 + +first 0 bit should move right 1 position each line + 0 0 -1 000000000000000000000000000 + 1 1 0 100000000000000000000000000 + 2 2 0 110000000000000000000000000 + 3 3 0 111000000000000000000000000 + 4 4 0 111100000000000000000000000 + 5 5 0 111110000000000000000000000 + 6 6 0 111111000000000000000000000 + 7 7 0 111111100000000000000000000 + 8 8 0 111111110000000000000000000 + 9 9 0 111111111000000000000000000 + 10 10 0 111111111100000000000000000 + 11 11 0 111111111110000000000000000 + 12 12 0 111111111111000000000000000 + 13 13 0 111111111111100000000000000 + 14 14 0 111111111111110000000000000 + 15 15 0 111111111111111000000000000 + 16 16 0 111111111111111100000000000 + 17 17 0 111111111111111110000000000 + 18 18 0 111111111111111111000000000 + 19 19 0 111111111111111111100000000 + 20 20 0 111111111111111111110000000 + 21 21 0 111111111111111111111000000 + 22 22 0 111111111111111111111100000 + 23 23 0 111111111111111111111110000 + 24 24 0 111111111111111111111111000 + 25 25 0 111111111111111111111111100 + 26 26 0 111111111111111111111111110 + +first 0 bit should move left 1 position each line + 0 -1 0 111111111111111111111111111 + 1 26 0 111111111111111111111111110 + 2 25 0 111111111111111111111111100 + 3 24 0 111111111111111111111111000 + 4 23 0 111111111111111111111110000 + 5 22 0 111111111111111111111100000 + 6 21 0 111111111111111111111000000 + 7 20 0 111111111111111111110000000 + 8 19 0 111111111111111111100000000 + 9 18 0 111111111111111111000000000 + 10 17 0 111111111111111110000000000 + 11 16 0 111111111111111100000000000 + 12 15 0 111111111111111000000000000 + 13 14 0 111111111111110000000000000 + 14 13 0 111111111111100000000000000 + 15 12 0 111111111111000000000000000 + 16 11 0 111111111110000000000000000 + 17 10 0 111111111100000000000000000 + 18 9 0 111111111000000000000000000 + 19 8 0 111111110000000000000000000 + 20 7 0 111111100000000000000000000 + 21 6 0 111111000000000000000000000 + 22 5 0 111110000000000000000000000 + 23 4 0 111100000000000000000000000 + 24 3 0 111000000000000000000000000 + 25 2 0 110000000000000000000000000 + 26 1 0 100000000000000000000000000 + +first 1 bit should move left 1 position each line + 0 0 -1 000000000000000000000000000 + 1 0 26 000000000000000000000000001 + 2 0 25 000000000000000000000000011 + 3 0 24 000000000000000000000000111 + 4 0 23 000000000000000000000001111 + 5 0 22 000000000000000000000011111 + 6 0 21 000000000000000000000111111 + 7 0 20 000000000000000000001111111 + 8 0 19 000000000000000000011111111 + 9 0 18 000000000000000000111111111 + 10 0 17 000000000000000001111111111 + 11 0 16 000000000000000011111111111 + 12 0 15 000000000000000111111111111 + 13 0 14 000000000000001111111111111 + 14 0 13 000000000000011111111111111 + 15 0 12 000000000000111111111111111 + 16 0 11 000000000001111111111111111 + 17 0 10 000000000011111111111111111 + 18 0 9 000000000111111111111111111 + 19 0 8 000000001111111111111111111 + 20 0 7 000000011111111111111111111 + 21 0 6 000000111111111111111111111 + 22 0 5 000001111111111111111111111 + 23 0 4 000011111111111111111111111 + 24 0 3 000111111111111111111111111 + 25 0 2 001111111111111111111111111 + 26 0 1 011111111111111111111111111 + +0 bit should move right 1 position each line + 0 0 1 011111111111111111111111111 + 1 1 0 101111111111111111111111111 + 2 2 0 110111111111111111111111111 + 3 3 0 111011111111111111111111111 + 4 4 0 111101111111111111111111111 + 5 5 0 111110111111111111111111111 + 6 6 0 111111011111111111111111111 + 7 7 0 111111101111111111111111111 + 8 8 0 111111110111111111111111111 + 9 9 0 111111111011111111111111111 + 10 10 0 111111111101111111111111111 + 11 11 0 111111111110111111111111111 + 12 12 0 111111111111011111111111111 + 13 13 0 111111111111101111111111111 + 14 14 0 111111111111110111111111111 + 15 15 0 111111111111111011111111111 + 16 16 0 111111111111111101111111111 + 17 17 0 111111111111111110111111111 + 18 18 0 111111111111111111011111111 + 19 19 0 111111111111111111101111111 + 20 20 0 111111111111111111110111111 + 21 21 0 111111111111111111111011111 + 22 22 0 111111111111111111111101111 + 23 23 0 111111111111111111111110111 + 24 24 0 111111111111111111111111011 + 25 25 0 111111111111111111111111101 + 26 26 0 111111111111111111111111110 + +1 bit should move right 1 position each line + 0 1 0 100000000000000000000000000 + 1 0 1 010000000000000000000000000 + 2 0 2 001000000000000000000000000 + 3 0 3 000100000000000000000000000 + 4 0 4 000010000000000000000000000 + 5 0 5 000001000000000000000000000 + 6 0 6 000000100000000000000000000 + 7 0 7 000000010000000000000000000 + 8 0 8 000000001000000000000000000 + 9 0 9 000000000100000000000000000 + 10 0 10 000000000010000000000000000 + 11 0 11 000000000001000000000000000 + 12 0 12 000000000000100000000000000 + 13 0 13 000000000000010000000000000 + 14 0 14 000000000000001000000000000 + 15 0 15 000000000000000100000000000 + 16 0 16 000000000000000010000000000 + 17 0 17 000000000000000001000000000 + 18 0 18 000000000000000000100000000 + 19 0 19 000000000000000000010000000 + 20 0 20 000000000000000000001000000 + 21 0 21 000000000000000000000100000 + 22 0 22 000000000000000000000010000 + 23 0 23 000000000000000000000001000 + 24 0 24 000000000000000000000000100 + 25 0 25 000000000000000000000000010 + 26 0 26 000000000000000000000000001 diff --git a/regress/include/bitstring/good/32 b/regress/include/bitstring/good/32 new file mode 100644 index 00000000000..2e1ca55d6e3 --- /dev/null +++ b/regress/include/bitstring/good/32 @@ -0,0 +1,303 @@ +Testing with TEST_LENGTH = 32 + +test _bit_byte, _bit_mask, and bitstr_size + i _bit_byte(i) _bit_mask(i) bitstr_size(i) + 0 0 1 0 + 1 0 2 1 + 2 0 4 1 + 3 0 8 1 + 4 0 16 1 + 5 0 32 1 + 6 0 64 1 + 7 0 128 1 + 8 1 1 1 + 9 1 2 2 + 10 1 4 2 + 11 1 8 2 + 12 1 16 2 + 13 1 32 2 + 14 1 64 2 + 15 1 128 2 + 16 2 1 2 + 17 2 2 3 + 18 2 4 3 + 19 2 8 3 + 20 2 16 3 + 21 2 32 3 + 22 2 64 3 + 23 2 128 3 + 24 3 1 3 + 25 3 2 4 + 26 3 4 4 + 27 3 8 4 + 28 3 16 4 + 29 3 32 4 + 30 3 64 4 + 31 3 128 4 + +test bit_alloc, clearbits, bit_ffc, bit_ffs +be: 0 -1 00000000000000000000000000000000 +is: 0 -1 00000000000000000000000000000000 + +test bit_set +be: 1 0 10010010010010010010010010010010 +is: 1 0 10010010010010010010010010010010 + +test bit_clear +be: 0 3 00010000010000010000010000010000 +is: 0 3 00010000010000010000010000010000 + +test bit_test using previous bitstring + i bit_test(i) + 0 0 + 1 0 + 2 0 + 3 8 + 4 0 + 5 0 + 6 0 + 7 0 + 8 0 + 9 2 + 10 0 + 11 0 + 12 0 + 13 0 + 14 0 + 15 128 + 16 0 + 17 0 + 18 0 + 19 0 + 20 0 + 21 32 + 22 0 + 23 0 + 24 0 + 25 0 + 26 0 + 27 8 + 28 0 + 29 0 + 30 0 + 31 0 + +test clearbits +be: 0 -1 00000000000000000000000000000000 +is: 0 -1 00000000000000000000000000000000 + +test bit_nset and bit_nclear +be: 0 1 01111111111111111111111111111110 +is: 0 1 01111111111111111111111111111110 +be: 0 1 01000000000000000000000000000010 +is: 0 1 01000000000000000000000000000010 +be: 0 -1 00000000000000000000000000000000 +is: 0 -1 00000000000000000000000000000000 +be: 31 0 11111111111111111111111111111110 +is: 31 0 11111111111111111111111111111110 +be: 0 -1 00000000000000000000000000000000 +is: 0 -1 00000000000000000000000000000000 + +first 1 bit should move right 1 position each line + 0 -1 0 11111111111111111111111111111111 + 1 0 1 01111111111111111111111111111111 + 2 0 2 00111111111111111111111111111111 + 3 0 3 00011111111111111111111111111111 + 4 0 4 00001111111111111111111111111111 + 5 0 5 00000111111111111111111111111111 + 6 0 6 00000011111111111111111111111111 + 7 0 7 00000001111111111111111111111111 + 8 0 8 00000000111111111111111111111111 + 9 0 9 00000000011111111111111111111111 + 10 0 10 00000000001111111111111111111111 + 11 0 11 00000000000111111111111111111111 + 12 0 12 00000000000011111111111111111111 + 13 0 13 00000000000001111111111111111111 + 14 0 14 00000000000000111111111111111111 + 15 0 15 00000000000000011111111111111111 + 16 0 16 00000000000000001111111111111111 + 17 0 17 00000000000000000111111111111111 + 18 0 18 00000000000000000011111111111111 + 19 0 19 00000000000000000001111111111111 + 20 0 20 00000000000000000000111111111111 + 21 0 21 00000000000000000000011111111111 + 22 0 22 00000000000000000000001111111111 + 23 0 23 00000000000000000000000111111111 + 24 0 24 00000000000000000000000011111111 + 25 0 25 00000000000000000000000001111111 + 26 0 26 00000000000000000000000000111111 + 27 0 27 00000000000000000000000000011111 + 28 0 28 00000000000000000000000000001111 + 29 0 29 00000000000000000000000000000111 + 30 0 30 00000000000000000000000000000011 + 31 0 31 00000000000000000000000000000001 + +first 0 bit should move right 1 position each line + 0 0 -1 00000000000000000000000000000000 + 1 1 0 10000000000000000000000000000000 + 2 2 0 11000000000000000000000000000000 + 3 3 0 11100000000000000000000000000000 + 4 4 0 11110000000000000000000000000000 + 5 5 0 11111000000000000000000000000000 + 6 6 0 11111100000000000000000000000000 + 7 7 0 11111110000000000000000000000000 + 8 8 0 11111111000000000000000000000000 + 9 9 0 11111111100000000000000000000000 + 10 10 0 11111111110000000000000000000000 + 11 11 0 11111111111000000000000000000000 + 12 12 0 11111111111100000000000000000000 + 13 13 0 11111111111110000000000000000000 + 14 14 0 11111111111111000000000000000000 + 15 15 0 11111111111111100000000000000000 + 16 16 0 11111111111111110000000000000000 + 17 17 0 11111111111111111000000000000000 + 18 18 0 11111111111111111100000000000000 + 19 19 0 11111111111111111110000000000000 + 20 20 0 11111111111111111111000000000000 + 21 21 0 11111111111111111111100000000000 + 22 22 0 11111111111111111111110000000000 + 23 23 0 11111111111111111111111000000000 + 24 24 0 11111111111111111111111100000000 + 25 25 0 11111111111111111111111110000000 + 26 26 0 11111111111111111111111111000000 + 27 27 0 11111111111111111111111111100000 + 28 28 0 11111111111111111111111111110000 + 29 29 0 11111111111111111111111111111000 + 30 30 0 11111111111111111111111111111100 + 31 31 0 11111111111111111111111111111110 + +first 0 bit should move left 1 position each line + 0 -1 0 11111111111111111111111111111111 + 1 31 0 11111111111111111111111111111110 + 2 30 0 11111111111111111111111111111100 + 3 29 0 11111111111111111111111111111000 + 4 28 0 11111111111111111111111111110000 + 5 27 0 11111111111111111111111111100000 + 6 26 0 11111111111111111111111111000000 + 7 25 0 11111111111111111111111110000000 + 8 24 0 11111111111111111111111100000000 + 9 23 0 11111111111111111111111000000000 + 10 22 0 11111111111111111111110000000000 + 11 21 0 11111111111111111111100000000000 + 12 20 0 11111111111111111111000000000000 + 13 19 0 11111111111111111110000000000000 + 14 18 0 11111111111111111100000000000000 + 15 17 0 11111111111111111000000000000000 + 16 16 0 11111111111111110000000000000000 + 17 15 0 11111111111111100000000000000000 + 18 14 0 11111111111111000000000000000000 + 19 13 0 11111111111110000000000000000000 + 20 12 0 11111111111100000000000000000000 + 21 11 0 11111111111000000000000000000000 + 22 10 0 11111111110000000000000000000000 + 23 9 0 11111111100000000000000000000000 + 24 8 0 11111111000000000000000000000000 + 25 7 0 11111110000000000000000000000000 + 26 6 0 11111100000000000000000000000000 + 27 5 0 11111000000000000000000000000000 + 28 4 0 11110000000000000000000000000000 + 29 3 0 11100000000000000000000000000000 + 30 2 0 11000000000000000000000000000000 + 31 1 0 10000000000000000000000000000000 + +first 1 bit should move left 1 position each line + 0 0 -1 00000000000000000000000000000000 + 1 0 31 00000000000000000000000000000001 + 2 0 30 00000000000000000000000000000011 + 3 0 29 00000000000000000000000000000111 + 4 0 28 00000000000000000000000000001111 + 5 0 27 00000000000000000000000000011111 + 6 0 26 00000000000000000000000000111111 + 7 0 25 00000000000000000000000001111111 + 8 0 24 00000000000000000000000011111111 + 9 0 23 00000000000000000000000111111111 + 10 0 22 00000000000000000000001111111111 + 11 0 21 00000000000000000000011111111111 + 12 0 20 00000000000000000000111111111111 + 13 0 19 00000000000000000001111111111111 + 14 0 18 00000000000000000011111111111111 + 15 0 17 00000000000000000111111111111111 + 16 0 16 00000000000000001111111111111111 + 17 0 15 00000000000000011111111111111111 + 18 0 14 00000000000000111111111111111111 + 19 0 13 00000000000001111111111111111111 + 20 0 12 00000000000011111111111111111111 + 21 0 11 00000000000111111111111111111111 + 22 0 10 00000000001111111111111111111111 + 23 0 9 00000000011111111111111111111111 + 24 0 8 00000000111111111111111111111111 + 25 0 7 00000001111111111111111111111111 + 26 0 6 00000011111111111111111111111111 + 27 0 5 00000111111111111111111111111111 + 28 0 4 00001111111111111111111111111111 + 29 0 3 00011111111111111111111111111111 + 30 0 2 00111111111111111111111111111111 + 31 0 1 01111111111111111111111111111111 + +0 bit should move right 1 position each line + 0 0 1 01111111111111111111111111111111 + 1 1 0 10111111111111111111111111111111 + 2 2 0 11011111111111111111111111111111 + 3 3 0 11101111111111111111111111111111 + 4 4 0 11110111111111111111111111111111 + 5 5 0 11111011111111111111111111111111 + 6 6 0 11111101111111111111111111111111 + 7 7 0 11111110111111111111111111111111 + 8 8 0 11111111011111111111111111111111 + 9 9 0 11111111101111111111111111111111 + 10 10 0 11111111110111111111111111111111 + 11 11 0 11111111111011111111111111111111 + 12 12 0 11111111111101111111111111111111 + 13 13 0 11111111111110111111111111111111 + 14 14 0 11111111111111011111111111111111 + 15 15 0 11111111111111101111111111111111 + 16 16 0 11111111111111110111111111111111 + 17 17 0 11111111111111111011111111111111 + 18 18 0 11111111111111111101111111111111 + 19 19 0 11111111111111111110111111111111 + 20 20 0 11111111111111111111011111111111 + 21 21 0 11111111111111111111101111111111 + 22 22 0 11111111111111111111110111111111 + 23 23 0 11111111111111111111111011111111 + 24 24 0 11111111111111111111111101111111 + 25 25 0 11111111111111111111111110111111 + 26 26 0 11111111111111111111111111011111 + 27 27 0 11111111111111111111111111101111 + 28 28 0 11111111111111111111111111110111 + 29 29 0 11111111111111111111111111111011 + 30 30 0 11111111111111111111111111111101 + 31 31 0 11111111111111111111111111111110 + +1 bit should move right 1 position each line + 0 1 0 10000000000000000000000000000000 + 1 0 1 01000000000000000000000000000000 + 2 0 2 00100000000000000000000000000000 + 3 0 3 00010000000000000000000000000000 + 4 0 4 00001000000000000000000000000000 + 5 0 5 00000100000000000000000000000000 + 6 0 6 00000010000000000000000000000000 + 7 0 7 00000001000000000000000000000000 + 8 0 8 00000000100000000000000000000000 + 9 0 9 00000000010000000000000000000000 + 10 0 10 00000000001000000000000000000000 + 11 0 11 00000000000100000000000000000000 + 12 0 12 00000000000010000000000000000000 + 13 0 13 00000000000001000000000000000000 + 14 0 14 00000000000000100000000000000000 + 15 0 15 00000000000000010000000000000000 + 16 0 16 00000000000000001000000000000000 + 17 0 17 00000000000000000100000000000000 + 18 0 18 00000000000000000010000000000000 + 19 0 19 00000000000000000001000000000000 + 20 0 20 00000000000000000000100000000000 + 21 0 21 00000000000000000000010000000000 + 22 0 22 00000000000000000000001000000000 + 23 0 23 00000000000000000000000100000000 + 24 0 24 00000000000000000000000010000000 + 25 0 25 00000000000000000000000001000000 + 26 0 26 00000000000000000000000000100000 + 27 0 27 00000000000000000000000000010000 + 28 0 28 00000000000000000000000000001000 + 29 0 29 00000000000000000000000000000100 + 30 0 30 00000000000000000000000000000010 + 31 0 31 00000000000000000000000000000001 diff --git a/regress/include/bitstring/good/49 b/regress/include/bitstring/good/49 new file mode 100644 index 00000000000..d63c0692dee --- /dev/null +++ b/regress/include/bitstring/good/49 @@ -0,0 +1,439 @@ +Testing with TEST_LENGTH = 49 + +test _bit_byte, _bit_mask, and bitstr_size + i _bit_byte(i) _bit_mask(i) bitstr_size(i) + 0 0 1 0 + 1 0 2 1 + 2 0 4 1 + 3 0 8 1 + 4 0 16 1 + 5 0 32 1 + 6 0 64 1 + 7 0 128 1 + 8 1 1 1 + 9 1 2 2 + 10 1 4 2 + 11 1 8 2 + 12 1 16 2 + 13 1 32 2 + 14 1 64 2 + 15 1 128 2 + 16 2 1 2 + 17 2 2 3 + 18 2 4 3 + 19 2 8 3 + 20 2 16 3 + 21 2 32 3 + 22 2 64 3 + 23 2 128 3 + 24 3 1 3 + 25 3 2 4 + 26 3 4 4 + 27 3 8 4 + 28 3 16 4 + 29 3 32 4 + 30 3 64 4 + 31 3 128 4 + 32 4 1 4 + 33 4 2 5 + 34 4 4 5 + 35 4 8 5 + 36 4 16 5 + 37 4 32 5 + 38 4 64 5 + 39 4 128 5 + 40 5 1 5 + 41 5 2 6 + 42 5 4 6 + 43 5 8 6 + 44 5 16 6 + 45 5 32 6 + 46 5 64 6 + 47 5 128 6 + 48 6 1 6 + +test bit_alloc, clearbits, bit_ffc, bit_ffs +be: 0 -1 0000000000000000000000000000000000000000000000000 +is: 0 -1 0000000000000000000000000000000000000000000000000 + +test bit_set +be: 1 0 1001001001001001001001001001001001001001001001001 +is: 1 0 1001001001001001001001001001001001001001001001001 + +test bit_clear +be: 0 3 0001000001000001000001000001000001000001000001000 +is: 0 3 0001000001000001000001000001000001000001000001000 + +test bit_test using previous bitstring + i bit_test(i) + 0 0 + 1 0 + 2 0 + 3 8 + 4 0 + 5 0 + 6 0 + 7 0 + 8 0 + 9 2 + 10 0 + 11 0 + 12 0 + 13 0 + 14 0 + 15 128 + 16 0 + 17 0 + 18 0 + 19 0 + 20 0 + 21 32 + 22 0 + 23 0 + 24 0 + 25 0 + 26 0 + 27 8 + 28 0 + 29 0 + 30 0 + 31 0 + 32 0 + 33 2 + 34 0 + 35 0 + 36 0 + 37 0 + 38 0 + 39 128 + 40 0 + 41 0 + 42 0 + 43 0 + 44 0 + 45 32 + 46 0 + 47 0 + 48 0 + +test clearbits +be: 0 -1 0000000000000000000000000000000000000000000000000 +is: 0 -1 0000000000000000000000000000000000000000000000000 + +test bit_nset and bit_nclear +be: 0 1 0111111111111111111111111111111111111111111111110 +is: 0 1 0111111111111111111111111111111111111111111111110 +be: 0 1 0100000000000000000000000000000000000000000000010 +is: 0 1 0100000000000000000000000000000000000000000000010 +be: 0 -1 0000000000000000000000000000000000000000000000000 +is: 0 -1 0000000000000000000000000000000000000000000000000 +be: 48 0 1111111111111111111111111111111111111111111111110 +is: 48 0 1111111111111111111111111111111111111111111111110 +be: 0 -1 0000000000000000000000000000000000000000000000000 +is: 0 -1 0000000000000000000000000000000000000000000000000 + +first 1 bit should move right 1 position each line + 0 -1 0 1111111111111111111111111111111111111111111111111 + 1 0 1 0111111111111111111111111111111111111111111111111 + 2 0 2 0011111111111111111111111111111111111111111111111 + 3 0 3 0001111111111111111111111111111111111111111111111 + 4 0 4 0000111111111111111111111111111111111111111111111 + 5 0 5 0000011111111111111111111111111111111111111111111 + 6 0 6 0000001111111111111111111111111111111111111111111 + 7 0 7 0000000111111111111111111111111111111111111111111 + 8 0 8 0000000011111111111111111111111111111111111111111 + 9 0 9 0000000001111111111111111111111111111111111111111 + 10 0 10 0000000000111111111111111111111111111111111111111 + 11 0 11 0000000000011111111111111111111111111111111111111 + 12 0 12 0000000000001111111111111111111111111111111111111 + 13 0 13 0000000000000111111111111111111111111111111111111 + 14 0 14 0000000000000011111111111111111111111111111111111 + 15 0 15 0000000000000001111111111111111111111111111111111 + 16 0 16 0000000000000000111111111111111111111111111111111 + 17 0 17 0000000000000000011111111111111111111111111111111 + 18 0 18 0000000000000000001111111111111111111111111111111 + 19 0 19 0000000000000000000111111111111111111111111111111 + 20 0 20 0000000000000000000011111111111111111111111111111 + 21 0 21 0000000000000000000001111111111111111111111111111 + 22 0 22 0000000000000000000000111111111111111111111111111 + 23 0 23 0000000000000000000000011111111111111111111111111 + 24 0 24 0000000000000000000000001111111111111111111111111 + 25 0 25 0000000000000000000000000111111111111111111111111 + 26 0 26 0000000000000000000000000011111111111111111111111 + 27 0 27 0000000000000000000000000001111111111111111111111 + 28 0 28 0000000000000000000000000000111111111111111111111 + 29 0 29 0000000000000000000000000000011111111111111111111 + 30 0 30 0000000000000000000000000000001111111111111111111 + 31 0 31 0000000000000000000000000000000111111111111111111 + 32 0 32 0000000000000000000000000000000011111111111111111 + 33 0 33 0000000000000000000000000000000001111111111111111 + 34 0 34 0000000000000000000000000000000000111111111111111 + 35 0 35 0000000000000000000000000000000000011111111111111 + 36 0 36 0000000000000000000000000000000000001111111111111 + 37 0 37 0000000000000000000000000000000000000111111111111 + 38 0 38 0000000000000000000000000000000000000011111111111 + 39 0 39 0000000000000000000000000000000000000001111111111 + 40 0 40 0000000000000000000000000000000000000000111111111 + 41 0 41 0000000000000000000000000000000000000000011111111 + 42 0 42 0000000000000000000000000000000000000000001111111 + 43 0 43 0000000000000000000000000000000000000000000111111 + 44 0 44 0000000000000000000000000000000000000000000011111 + 45 0 45 0000000000000000000000000000000000000000000001111 + 46 0 46 0000000000000000000000000000000000000000000000111 + 47 0 47 0000000000000000000000000000000000000000000000011 + 48 0 48 0000000000000000000000000000000000000000000000001 + +first 0 bit should move right 1 position each line + 0 0 -1 0000000000000000000000000000000000000000000000000 + 1 1 0 1000000000000000000000000000000000000000000000000 + 2 2 0 1100000000000000000000000000000000000000000000000 + 3 3 0 1110000000000000000000000000000000000000000000000 + 4 4 0 1111000000000000000000000000000000000000000000000 + 5 5 0 1111100000000000000000000000000000000000000000000 + 6 6 0 1111110000000000000000000000000000000000000000000 + 7 7 0 1111111000000000000000000000000000000000000000000 + 8 8 0 1111111100000000000000000000000000000000000000000 + 9 9 0 1111111110000000000000000000000000000000000000000 + 10 10 0 1111111111000000000000000000000000000000000000000 + 11 11 0 1111111111100000000000000000000000000000000000000 + 12 12 0 1111111111110000000000000000000000000000000000000 + 13 13 0 1111111111111000000000000000000000000000000000000 + 14 14 0 1111111111111100000000000000000000000000000000000 + 15 15 0 1111111111111110000000000000000000000000000000000 + 16 16 0 1111111111111111000000000000000000000000000000000 + 17 17 0 1111111111111111100000000000000000000000000000000 + 18 18 0 1111111111111111110000000000000000000000000000000 + 19 19 0 1111111111111111111000000000000000000000000000000 + 20 20 0 1111111111111111111100000000000000000000000000000 + 21 21 0 1111111111111111111110000000000000000000000000000 + 22 22 0 1111111111111111111111000000000000000000000000000 + 23 23 0 1111111111111111111111100000000000000000000000000 + 24 24 0 1111111111111111111111110000000000000000000000000 + 25 25 0 1111111111111111111111111000000000000000000000000 + 26 26 0 1111111111111111111111111100000000000000000000000 + 27 27 0 1111111111111111111111111110000000000000000000000 + 28 28 0 1111111111111111111111111111000000000000000000000 + 29 29 0 1111111111111111111111111111100000000000000000000 + 30 30 0 1111111111111111111111111111110000000000000000000 + 31 31 0 1111111111111111111111111111111000000000000000000 + 32 32 0 1111111111111111111111111111111100000000000000000 + 33 33 0 1111111111111111111111111111111110000000000000000 + 34 34 0 1111111111111111111111111111111111000000000000000 + 35 35 0 1111111111111111111111111111111111100000000000000 + 36 36 0 1111111111111111111111111111111111110000000000000 + 37 37 0 1111111111111111111111111111111111111000000000000 + 38 38 0 1111111111111111111111111111111111111100000000000 + 39 39 0 1111111111111111111111111111111111111110000000000 + 40 40 0 1111111111111111111111111111111111111111000000000 + 41 41 0 1111111111111111111111111111111111111111100000000 + 42 42 0 1111111111111111111111111111111111111111110000000 + 43 43 0 1111111111111111111111111111111111111111111000000 + 44 44 0 1111111111111111111111111111111111111111111100000 + 45 45 0 1111111111111111111111111111111111111111111110000 + 46 46 0 1111111111111111111111111111111111111111111111000 + 47 47 0 1111111111111111111111111111111111111111111111100 + 48 48 0 1111111111111111111111111111111111111111111111110 + +first 0 bit should move left 1 position each line + 0 -1 0 1111111111111111111111111111111111111111111111111 + 1 48 0 1111111111111111111111111111111111111111111111110 + 2 47 0 1111111111111111111111111111111111111111111111100 + 3 46 0 1111111111111111111111111111111111111111111111000 + 4 45 0 1111111111111111111111111111111111111111111110000 + 5 44 0 1111111111111111111111111111111111111111111100000 + 6 43 0 1111111111111111111111111111111111111111111000000 + 7 42 0 1111111111111111111111111111111111111111110000000 + 8 41 0 1111111111111111111111111111111111111111100000000 + 9 40 0 1111111111111111111111111111111111111111000000000 + 10 39 0 1111111111111111111111111111111111111110000000000 + 11 38 0 1111111111111111111111111111111111111100000000000 + 12 37 0 1111111111111111111111111111111111111000000000000 + 13 36 0 1111111111111111111111111111111111110000000000000 + 14 35 0 1111111111111111111111111111111111100000000000000 + 15 34 0 1111111111111111111111111111111111000000000000000 + 16 33 0 1111111111111111111111111111111110000000000000000 + 17 32 0 1111111111111111111111111111111100000000000000000 + 18 31 0 1111111111111111111111111111111000000000000000000 + 19 30 0 1111111111111111111111111111110000000000000000000 + 20 29 0 1111111111111111111111111111100000000000000000000 + 21 28 0 1111111111111111111111111111000000000000000000000 + 22 27 0 1111111111111111111111111110000000000000000000000 + 23 26 0 1111111111111111111111111100000000000000000000000 + 24 25 0 1111111111111111111111111000000000000000000000000 + 25 24 0 1111111111111111111111110000000000000000000000000 + 26 23 0 1111111111111111111111100000000000000000000000000 + 27 22 0 1111111111111111111111000000000000000000000000000 + 28 21 0 1111111111111111111110000000000000000000000000000 + 29 20 0 1111111111111111111100000000000000000000000000000 + 30 19 0 1111111111111111111000000000000000000000000000000 + 31 18 0 1111111111111111110000000000000000000000000000000 + 32 17 0 1111111111111111100000000000000000000000000000000 + 33 16 0 1111111111111111000000000000000000000000000000000 + 34 15 0 1111111111111110000000000000000000000000000000000 + 35 14 0 1111111111111100000000000000000000000000000000000 + 36 13 0 1111111111111000000000000000000000000000000000000 + 37 12 0 1111111111110000000000000000000000000000000000000 + 38 11 0 1111111111100000000000000000000000000000000000000 + 39 10 0 1111111111000000000000000000000000000000000000000 + 40 9 0 1111111110000000000000000000000000000000000000000 + 41 8 0 1111111100000000000000000000000000000000000000000 + 42 7 0 1111111000000000000000000000000000000000000000000 + 43 6 0 1111110000000000000000000000000000000000000000000 + 44 5 0 1111100000000000000000000000000000000000000000000 + 45 4 0 1111000000000000000000000000000000000000000000000 + 46 3 0 1110000000000000000000000000000000000000000000000 + 47 2 0 1100000000000000000000000000000000000000000000000 + 48 1 0 1000000000000000000000000000000000000000000000000 + +first 1 bit should move left 1 position each line + 0 0 -1 0000000000000000000000000000000000000000000000000 + 1 0 48 0000000000000000000000000000000000000000000000001 + 2 0 47 0000000000000000000000000000000000000000000000011 + 3 0 46 0000000000000000000000000000000000000000000000111 + 4 0 45 0000000000000000000000000000000000000000000001111 + 5 0 44 0000000000000000000000000000000000000000000011111 + 6 0 43 0000000000000000000000000000000000000000000111111 + 7 0 42 0000000000000000000000000000000000000000001111111 + 8 0 41 0000000000000000000000000000000000000000011111111 + 9 0 40 0000000000000000000000000000000000000000111111111 + 10 0 39 0000000000000000000000000000000000000001111111111 + 11 0 38 0000000000000000000000000000000000000011111111111 + 12 0 37 0000000000000000000000000000000000000111111111111 + 13 0 36 0000000000000000000000000000000000001111111111111 + 14 0 35 0000000000000000000000000000000000011111111111111 + 15 0 34 0000000000000000000000000000000000111111111111111 + 16 0 33 0000000000000000000000000000000001111111111111111 + 17 0 32 0000000000000000000000000000000011111111111111111 + 18 0 31 0000000000000000000000000000000111111111111111111 + 19 0 30 0000000000000000000000000000001111111111111111111 + 20 0 29 0000000000000000000000000000011111111111111111111 + 21 0 28 0000000000000000000000000000111111111111111111111 + 22 0 27 0000000000000000000000000001111111111111111111111 + 23 0 26 0000000000000000000000000011111111111111111111111 + 24 0 25 0000000000000000000000000111111111111111111111111 + 25 0 24 0000000000000000000000001111111111111111111111111 + 26 0 23 0000000000000000000000011111111111111111111111111 + 27 0 22 0000000000000000000000111111111111111111111111111 + 28 0 21 0000000000000000000001111111111111111111111111111 + 29 0 20 0000000000000000000011111111111111111111111111111 + 30 0 19 0000000000000000000111111111111111111111111111111 + 31 0 18 0000000000000000001111111111111111111111111111111 + 32 0 17 0000000000000000011111111111111111111111111111111 + 33 0 16 0000000000000000111111111111111111111111111111111 + 34 0 15 0000000000000001111111111111111111111111111111111 + 35 0 14 0000000000000011111111111111111111111111111111111 + 36 0 13 0000000000000111111111111111111111111111111111111 + 37 0 12 0000000000001111111111111111111111111111111111111 + 38 0 11 0000000000011111111111111111111111111111111111111 + 39 0 10 0000000000111111111111111111111111111111111111111 + 40 0 9 0000000001111111111111111111111111111111111111111 + 41 0 8 0000000011111111111111111111111111111111111111111 + 42 0 7 0000000111111111111111111111111111111111111111111 + 43 0 6 0000001111111111111111111111111111111111111111111 + 44 0 5 0000011111111111111111111111111111111111111111111 + 45 0 4 0000111111111111111111111111111111111111111111111 + 46 0 3 0001111111111111111111111111111111111111111111111 + 47 0 2 0011111111111111111111111111111111111111111111111 + 48 0 1 0111111111111111111111111111111111111111111111111 + +0 bit should move right 1 position each line + 0 0 1 0111111111111111111111111111111111111111111111111 + 1 1 0 1011111111111111111111111111111111111111111111111 + 2 2 0 1101111111111111111111111111111111111111111111111 + 3 3 0 1110111111111111111111111111111111111111111111111 + 4 4 0 1111011111111111111111111111111111111111111111111 + 5 5 0 1111101111111111111111111111111111111111111111111 + 6 6 0 1111110111111111111111111111111111111111111111111 + 7 7 0 1111111011111111111111111111111111111111111111111 + 8 8 0 1111111101111111111111111111111111111111111111111 + 9 9 0 1111111110111111111111111111111111111111111111111 + 10 10 0 1111111111011111111111111111111111111111111111111 + 11 11 0 1111111111101111111111111111111111111111111111111 + 12 12 0 1111111111110111111111111111111111111111111111111 + 13 13 0 1111111111111011111111111111111111111111111111111 + 14 14 0 1111111111111101111111111111111111111111111111111 + 15 15 0 1111111111111110111111111111111111111111111111111 + 16 16 0 1111111111111111011111111111111111111111111111111 + 17 17 0 1111111111111111101111111111111111111111111111111 + 18 18 0 1111111111111111110111111111111111111111111111111 + 19 19 0 1111111111111111111011111111111111111111111111111 + 20 20 0 1111111111111111111101111111111111111111111111111 + 21 21 0 1111111111111111111110111111111111111111111111111 + 22 22 0 1111111111111111111111011111111111111111111111111 + 23 23 0 1111111111111111111111101111111111111111111111111 + 24 24 0 1111111111111111111111110111111111111111111111111 + 25 25 0 1111111111111111111111111011111111111111111111111 + 26 26 0 1111111111111111111111111101111111111111111111111 + 27 27 0 1111111111111111111111111110111111111111111111111 + 28 28 0 1111111111111111111111111111011111111111111111111 + 29 29 0 1111111111111111111111111111101111111111111111111 + 30 30 0 1111111111111111111111111111110111111111111111111 + 31 31 0 1111111111111111111111111111111011111111111111111 + 32 32 0 1111111111111111111111111111111101111111111111111 + 33 33 0 1111111111111111111111111111111110111111111111111 + 34 34 0 1111111111111111111111111111111111011111111111111 + 35 35 0 1111111111111111111111111111111111101111111111111 + 36 36 0 1111111111111111111111111111111111110111111111111 + 37 37 0 1111111111111111111111111111111111111011111111111 + 38 38 0 1111111111111111111111111111111111111101111111111 + 39 39 0 1111111111111111111111111111111111111110111111111 + 40 40 0 1111111111111111111111111111111111111111011111111 + 41 41 0 1111111111111111111111111111111111111111101111111 + 42 42 0 1111111111111111111111111111111111111111110111111 + 43 43 0 1111111111111111111111111111111111111111111011111 + 44 44 0 1111111111111111111111111111111111111111111101111 + 45 45 0 1111111111111111111111111111111111111111111110111 + 46 46 0 1111111111111111111111111111111111111111111111011 + 47 47 0 1111111111111111111111111111111111111111111111101 + 48 48 0 1111111111111111111111111111111111111111111111110 + +1 bit should move right 1 position each line + 0 1 0 1000000000000000000000000000000000000000000000000 + 1 0 1 0100000000000000000000000000000000000000000000000 + 2 0 2 0010000000000000000000000000000000000000000000000 + 3 0 3 0001000000000000000000000000000000000000000000000 + 4 0 4 0000100000000000000000000000000000000000000000000 + 5 0 5 0000010000000000000000000000000000000000000000000 + 6 0 6 0000001000000000000000000000000000000000000000000 + 7 0 7 0000000100000000000000000000000000000000000000000 + 8 0 8 0000000010000000000000000000000000000000000000000 + 9 0 9 0000000001000000000000000000000000000000000000000 + 10 0 10 0000000000100000000000000000000000000000000000000 + 11 0 11 0000000000010000000000000000000000000000000000000 + 12 0 12 0000000000001000000000000000000000000000000000000 + 13 0 13 0000000000000100000000000000000000000000000000000 + 14 0 14 0000000000000010000000000000000000000000000000000 + 15 0 15 0000000000000001000000000000000000000000000000000 + 16 0 16 0000000000000000100000000000000000000000000000000 + 17 0 17 0000000000000000010000000000000000000000000000000 + 18 0 18 0000000000000000001000000000000000000000000000000 + 19 0 19 0000000000000000000100000000000000000000000000000 + 20 0 20 0000000000000000000010000000000000000000000000000 + 21 0 21 0000000000000000000001000000000000000000000000000 + 22 0 22 0000000000000000000000100000000000000000000000000 + 23 0 23 0000000000000000000000010000000000000000000000000 + 24 0 24 0000000000000000000000001000000000000000000000000 + 25 0 25 0000000000000000000000000100000000000000000000000 + 26 0 26 0000000000000000000000000010000000000000000000000 + 27 0 27 0000000000000000000000000001000000000000000000000 + 28 0 28 0000000000000000000000000000100000000000000000000 + 29 0 29 0000000000000000000000000000010000000000000000000 + 30 0 30 0000000000000000000000000000001000000000000000000 + 31 0 31 0000000000000000000000000000000100000000000000000 + 32 0 32 0000000000000000000000000000000010000000000000000 + 33 0 33 0000000000000000000000000000000001000000000000000 + 34 0 34 0000000000000000000000000000000000100000000000000 + 35 0 35 0000000000000000000000000000000000010000000000000 + 36 0 36 0000000000000000000000000000000000001000000000000 + 37 0 37 0000000000000000000000000000000000000100000000000 + 38 0 38 0000000000000000000000000000000000000010000000000 + 39 0 39 0000000000000000000000000000000000000001000000000 + 40 0 40 0000000000000000000000000000000000000000100000000 + 41 0 41 0000000000000000000000000000000000000000010000000 + 42 0 42 0000000000000000000000000000000000000000001000000 + 43 0 43 0000000000000000000000000000000000000000000100000 + 44 0 44 0000000000000000000000000000000000000000000010000 + 45 0 45 0000000000000000000000000000000000000000000001000 + 46 0 46 0000000000000000000000000000000000000000000000100 + 47 0 47 0000000000000000000000000000000000000000000000010 + 48 0 48 0000000000000000000000000000000000000000000000001 diff --git a/regress/include/bitstring/good/64 b/regress/include/bitstring/good/64 new file mode 100644 index 00000000000..7e9308eabc7 --- /dev/null +++ b/regress/include/bitstring/good/64 @@ -0,0 +1,559 @@ +Testing with TEST_LENGTH = 64 + +test _bit_byte, _bit_mask, and bitstr_size + i _bit_byte(i) _bit_mask(i) bitstr_size(i) + 0 0 1 0 + 1 0 2 1 + 2 0 4 1 + 3 0 8 1 + 4 0 16 1 + 5 0 32 1 + 6 0 64 1 + 7 0 128 1 + 8 1 1 1 + 9 1 2 2 + 10 1 4 2 + 11 1 8 2 + 12 1 16 2 + 13 1 32 2 + 14 1 64 2 + 15 1 128 2 + 16 2 1 2 + 17 2 2 3 + 18 2 4 3 + 19 2 8 3 + 20 2 16 3 + 21 2 32 3 + 22 2 64 3 + 23 2 128 3 + 24 3 1 3 + 25 3 2 4 + 26 3 4 4 + 27 3 8 4 + 28 3 16 4 + 29 3 32 4 + 30 3 64 4 + 31 3 128 4 + 32 4 1 4 + 33 4 2 5 + 34 4 4 5 + 35 4 8 5 + 36 4 16 5 + 37 4 32 5 + 38 4 64 5 + 39 4 128 5 + 40 5 1 5 + 41 5 2 6 + 42 5 4 6 + 43 5 8 6 + 44 5 16 6 + 45 5 32 6 + 46 5 64 6 + 47 5 128 6 + 48 6 1 6 + 49 6 2 7 + 50 6 4 7 + 51 6 8 7 + 52 6 16 7 + 53 6 32 7 + 54 6 64 7 + 55 6 128 7 + 56 7 1 7 + 57 7 2 8 + 58 7 4 8 + 59 7 8 8 + 60 7 16 8 + 61 7 32 8 + 62 7 64 8 + 63 7 128 8 + +test bit_alloc, clearbits, bit_ffc, bit_ffs +be: 0 -1 0000000000000000000000000000000000000000000000000000000000000000 +is: 0 -1 0000000000000000000000000000000000000000000000000000000000000000 + +test bit_set +be: 1 0 1001001001001001001001001001001001001001001001001001001001001001 +is: 1 0 1001001001001001001001001001001001001001001001001001001001001001 + +test bit_clear +be: 0 3 0001000001000001000001000001000001000001000001000001000001000001 +is: 0 3 0001000001000001000001000001000001000001000001000001000001000001 + +test bit_test using previous bitstring + i bit_test(i) + 0 0 + 1 0 + 2 0 + 3 8 + 4 0 + 5 0 + 6 0 + 7 0 + 8 0 + 9 2 + 10 0 + 11 0 + 12 0 + 13 0 + 14 0 + 15 128 + 16 0 + 17 0 + 18 0 + 19 0 + 20 0 + 21 32 + 22 0 + 23 0 + 24 0 + 25 0 + 26 0 + 27 8 + 28 0 + 29 0 + 30 0 + 31 0 + 32 0 + 33 2 + 34 0 + 35 0 + 36 0 + 37 0 + 38 0 + 39 128 + 40 0 + 41 0 + 42 0 + 43 0 + 44 0 + 45 32 + 46 0 + 47 0 + 48 0 + 49 0 + 50 0 + 51 8 + 52 0 + 53 0 + 54 0 + 55 0 + 56 0 + 57 2 + 58 0 + 59 0 + 60 0 + 61 0 + 62 0 + 63 128 + +test clearbits +be: 0 -1 0000000000000000000000000000000000000000000000000000000000000000 +is: 0 -1 0000000000000000000000000000000000000000000000000000000000000000 + +test bit_nset and bit_nclear +be: 0 1 0111111111111111111111111111111111111111111111111111111111111110 +is: 0 1 0111111111111111111111111111111111111111111111111111111111111110 +be: 0 1 0100000000000000000000000000000000000000000000000000000000000010 +is: 0 1 0100000000000000000000000000000000000000000000000000000000000010 +be: 0 -1 0000000000000000000000000000000000000000000000000000000000000000 +is: 0 -1 0000000000000000000000000000000000000000000000000000000000000000 +be: 63 0 1111111111111111111111111111111111111111111111111111111111111110 +is: 63 0 1111111111111111111111111111111111111111111111111111111111111110 +be: 0 -1 0000000000000000000000000000000000000000000000000000000000000000 +is: 0 -1 0000000000000000000000000000000000000000000000000000000000000000 + +first 1 bit should move right 1 position each line + 0 -1 0 1111111111111111111111111111111111111111111111111111111111111111 + 1 0 1 0111111111111111111111111111111111111111111111111111111111111111 + 2 0 2 0011111111111111111111111111111111111111111111111111111111111111 + 3 0 3 0001111111111111111111111111111111111111111111111111111111111111 + 4 0 4 0000111111111111111111111111111111111111111111111111111111111111 + 5 0 5 0000011111111111111111111111111111111111111111111111111111111111 + 6 0 6 0000001111111111111111111111111111111111111111111111111111111111 + 7 0 7 0000000111111111111111111111111111111111111111111111111111111111 + 8 0 8 0000000011111111111111111111111111111111111111111111111111111111 + 9 0 9 0000000001111111111111111111111111111111111111111111111111111111 + 10 0 10 0000000000111111111111111111111111111111111111111111111111111111 + 11 0 11 0000000000011111111111111111111111111111111111111111111111111111 + 12 0 12 0000000000001111111111111111111111111111111111111111111111111111 + 13 0 13 0000000000000111111111111111111111111111111111111111111111111111 + 14 0 14 0000000000000011111111111111111111111111111111111111111111111111 + 15 0 15 0000000000000001111111111111111111111111111111111111111111111111 + 16 0 16 0000000000000000111111111111111111111111111111111111111111111111 + 17 0 17 0000000000000000011111111111111111111111111111111111111111111111 + 18 0 18 0000000000000000001111111111111111111111111111111111111111111111 + 19 0 19 0000000000000000000111111111111111111111111111111111111111111111 + 20 0 20 0000000000000000000011111111111111111111111111111111111111111111 + 21 0 21 0000000000000000000001111111111111111111111111111111111111111111 + 22 0 22 0000000000000000000000111111111111111111111111111111111111111111 + 23 0 23 0000000000000000000000011111111111111111111111111111111111111111 + 24 0 24 0000000000000000000000001111111111111111111111111111111111111111 + 25 0 25 0000000000000000000000000111111111111111111111111111111111111111 + 26 0 26 0000000000000000000000000011111111111111111111111111111111111111 + 27 0 27 0000000000000000000000000001111111111111111111111111111111111111 + 28 0 28 0000000000000000000000000000111111111111111111111111111111111111 + 29 0 29 0000000000000000000000000000011111111111111111111111111111111111 + 30 0 30 0000000000000000000000000000001111111111111111111111111111111111 + 31 0 31 0000000000000000000000000000000111111111111111111111111111111111 + 32 0 32 0000000000000000000000000000000011111111111111111111111111111111 + 33 0 33 0000000000000000000000000000000001111111111111111111111111111111 + 34 0 34 0000000000000000000000000000000000111111111111111111111111111111 + 35 0 35 0000000000000000000000000000000000011111111111111111111111111111 + 36 0 36 0000000000000000000000000000000000001111111111111111111111111111 + 37 0 37 0000000000000000000000000000000000000111111111111111111111111111 + 38 0 38 0000000000000000000000000000000000000011111111111111111111111111 + 39 0 39 0000000000000000000000000000000000000001111111111111111111111111 + 40 0 40 0000000000000000000000000000000000000000111111111111111111111111 + 41 0 41 0000000000000000000000000000000000000000011111111111111111111111 + 42 0 42 0000000000000000000000000000000000000000001111111111111111111111 + 43 0 43 0000000000000000000000000000000000000000000111111111111111111111 + 44 0 44 0000000000000000000000000000000000000000000011111111111111111111 + 45 0 45 0000000000000000000000000000000000000000000001111111111111111111 + 46 0 46 0000000000000000000000000000000000000000000000111111111111111111 + 47 0 47 0000000000000000000000000000000000000000000000011111111111111111 + 48 0 48 0000000000000000000000000000000000000000000000001111111111111111 + 49 0 49 0000000000000000000000000000000000000000000000000111111111111111 + 50 0 50 0000000000000000000000000000000000000000000000000011111111111111 + 51 0 51 0000000000000000000000000000000000000000000000000001111111111111 + 52 0 52 0000000000000000000000000000000000000000000000000000111111111111 + 53 0 53 0000000000000000000000000000000000000000000000000000011111111111 + 54 0 54 0000000000000000000000000000000000000000000000000000001111111111 + 55 0 55 0000000000000000000000000000000000000000000000000000000111111111 + 56 0 56 0000000000000000000000000000000000000000000000000000000011111111 + 57 0 57 0000000000000000000000000000000000000000000000000000000001111111 + 58 0 58 0000000000000000000000000000000000000000000000000000000000111111 + 59 0 59 0000000000000000000000000000000000000000000000000000000000011111 + 60 0 60 0000000000000000000000000000000000000000000000000000000000001111 + 61 0 61 0000000000000000000000000000000000000000000000000000000000000111 + 62 0 62 0000000000000000000000000000000000000000000000000000000000000011 + 63 0 63 0000000000000000000000000000000000000000000000000000000000000001 + +first 0 bit should move right 1 position each line + 0 0 -1 0000000000000000000000000000000000000000000000000000000000000000 + 1 1 0 1000000000000000000000000000000000000000000000000000000000000000 + 2 2 0 1100000000000000000000000000000000000000000000000000000000000000 + 3 3 0 1110000000000000000000000000000000000000000000000000000000000000 + 4 4 0 1111000000000000000000000000000000000000000000000000000000000000 + 5 5 0 1111100000000000000000000000000000000000000000000000000000000000 + 6 6 0 1111110000000000000000000000000000000000000000000000000000000000 + 7 7 0 1111111000000000000000000000000000000000000000000000000000000000 + 8 8 0 1111111100000000000000000000000000000000000000000000000000000000 + 9 9 0 1111111110000000000000000000000000000000000000000000000000000000 + 10 10 0 1111111111000000000000000000000000000000000000000000000000000000 + 11 11 0 1111111111100000000000000000000000000000000000000000000000000000 + 12 12 0 1111111111110000000000000000000000000000000000000000000000000000 + 13 13 0 1111111111111000000000000000000000000000000000000000000000000000 + 14 14 0 1111111111111100000000000000000000000000000000000000000000000000 + 15 15 0 1111111111111110000000000000000000000000000000000000000000000000 + 16 16 0 1111111111111111000000000000000000000000000000000000000000000000 + 17 17 0 1111111111111111100000000000000000000000000000000000000000000000 + 18 18 0 1111111111111111110000000000000000000000000000000000000000000000 + 19 19 0 1111111111111111111000000000000000000000000000000000000000000000 + 20 20 0 1111111111111111111100000000000000000000000000000000000000000000 + 21 21 0 1111111111111111111110000000000000000000000000000000000000000000 + 22 22 0 1111111111111111111111000000000000000000000000000000000000000000 + 23 23 0 1111111111111111111111100000000000000000000000000000000000000000 + 24 24 0 1111111111111111111111110000000000000000000000000000000000000000 + 25 25 0 1111111111111111111111111000000000000000000000000000000000000000 + 26 26 0 1111111111111111111111111100000000000000000000000000000000000000 + 27 27 0 1111111111111111111111111110000000000000000000000000000000000000 + 28 28 0 1111111111111111111111111111000000000000000000000000000000000000 + 29 29 0 1111111111111111111111111111100000000000000000000000000000000000 + 30 30 0 1111111111111111111111111111110000000000000000000000000000000000 + 31 31 0 1111111111111111111111111111111000000000000000000000000000000000 + 32 32 0 1111111111111111111111111111111100000000000000000000000000000000 + 33 33 0 1111111111111111111111111111111110000000000000000000000000000000 + 34 34 0 1111111111111111111111111111111111000000000000000000000000000000 + 35 35 0 1111111111111111111111111111111111100000000000000000000000000000 + 36 36 0 1111111111111111111111111111111111110000000000000000000000000000 + 37 37 0 1111111111111111111111111111111111111000000000000000000000000000 + 38 38 0 1111111111111111111111111111111111111100000000000000000000000000 + 39 39 0 1111111111111111111111111111111111111110000000000000000000000000 + 40 40 0 1111111111111111111111111111111111111111000000000000000000000000 + 41 41 0 1111111111111111111111111111111111111111100000000000000000000000 + 42 42 0 1111111111111111111111111111111111111111110000000000000000000000 + 43 43 0 1111111111111111111111111111111111111111111000000000000000000000 + 44 44 0 1111111111111111111111111111111111111111111100000000000000000000 + 45 45 0 1111111111111111111111111111111111111111111110000000000000000000 + 46 46 0 1111111111111111111111111111111111111111111111000000000000000000 + 47 47 0 1111111111111111111111111111111111111111111111100000000000000000 + 48 48 0 1111111111111111111111111111111111111111111111110000000000000000 + 49 49 0 1111111111111111111111111111111111111111111111111000000000000000 + 50 50 0 1111111111111111111111111111111111111111111111111100000000000000 + 51 51 0 1111111111111111111111111111111111111111111111111110000000000000 + 52 52 0 1111111111111111111111111111111111111111111111111111000000000000 + 53 53 0 1111111111111111111111111111111111111111111111111111100000000000 + 54 54 0 1111111111111111111111111111111111111111111111111111110000000000 + 55 55 0 1111111111111111111111111111111111111111111111111111111000000000 + 56 56 0 1111111111111111111111111111111111111111111111111111111100000000 + 57 57 0 1111111111111111111111111111111111111111111111111111111110000000 + 58 58 0 1111111111111111111111111111111111111111111111111111111111000000 + 59 59 0 1111111111111111111111111111111111111111111111111111111111100000 + 60 60 0 1111111111111111111111111111111111111111111111111111111111110000 + 61 61 0 1111111111111111111111111111111111111111111111111111111111111000 + 62 62 0 1111111111111111111111111111111111111111111111111111111111111100 + 63 63 0 1111111111111111111111111111111111111111111111111111111111111110 + +first 0 bit should move left 1 position each line + 0 -1 0 1111111111111111111111111111111111111111111111111111111111111111 + 1 63 0 1111111111111111111111111111111111111111111111111111111111111110 + 2 62 0 1111111111111111111111111111111111111111111111111111111111111100 + 3 61 0 1111111111111111111111111111111111111111111111111111111111111000 + 4 60 0 1111111111111111111111111111111111111111111111111111111111110000 + 5 59 0 1111111111111111111111111111111111111111111111111111111111100000 + 6 58 0 1111111111111111111111111111111111111111111111111111111111000000 + 7 57 0 1111111111111111111111111111111111111111111111111111111110000000 + 8 56 0 1111111111111111111111111111111111111111111111111111111100000000 + 9 55 0 1111111111111111111111111111111111111111111111111111111000000000 + 10 54 0 1111111111111111111111111111111111111111111111111111110000000000 + 11 53 0 1111111111111111111111111111111111111111111111111111100000000000 + 12 52 0 1111111111111111111111111111111111111111111111111111000000000000 + 13 51 0 1111111111111111111111111111111111111111111111111110000000000000 + 14 50 0 1111111111111111111111111111111111111111111111111100000000000000 + 15 49 0 1111111111111111111111111111111111111111111111111000000000000000 + 16 48 0 1111111111111111111111111111111111111111111111110000000000000000 + 17 47 0 1111111111111111111111111111111111111111111111100000000000000000 + 18 46 0 1111111111111111111111111111111111111111111111000000000000000000 + 19 45 0 1111111111111111111111111111111111111111111110000000000000000000 + 20 44 0 1111111111111111111111111111111111111111111100000000000000000000 + 21 43 0 1111111111111111111111111111111111111111111000000000000000000000 + 22 42 0 1111111111111111111111111111111111111111110000000000000000000000 + 23 41 0 1111111111111111111111111111111111111111100000000000000000000000 + 24 40 0 1111111111111111111111111111111111111111000000000000000000000000 + 25 39 0 1111111111111111111111111111111111111110000000000000000000000000 + 26 38 0 1111111111111111111111111111111111111100000000000000000000000000 + 27 37 0 1111111111111111111111111111111111111000000000000000000000000000 + 28 36 0 1111111111111111111111111111111111110000000000000000000000000000 + 29 35 0 1111111111111111111111111111111111100000000000000000000000000000 + 30 34 0 1111111111111111111111111111111111000000000000000000000000000000 + 31 33 0 1111111111111111111111111111111110000000000000000000000000000000 + 32 32 0 1111111111111111111111111111111100000000000000000000000000000000 + 33 31 0 1111111111111111111111111111111000000000000000000000000000000000 + 34 30 0 1111111111111111111111111111110000000000000000000000000000000000 + 35 29 0 1111111111111111111111111111100000000000000000000000000000000000 + 36 28 0 1111111111111111111111111111000000000000000000000000000000000000 + 37 27 0 1111111111111111111111111110000000000000000000000000000000000000 + 38 26 0 1111111111111111111111111100000000000000000000000000000000000000 + 39 25 0 1111111111111111111111111000000000000000000000000000000000000000 + 40 24 0 1111111111111111111111110000000000000000000000000000000000000000 + 41 23 0 1111111111111111111111100000000000000000000000000000000000000000 + 42 22 0 1111111111111111111111000000000000000000000000000000000000000000 + 43 21 0 1111111111111111111110000000000000000000000000000000000000000000 + 44 20 0 1111111111111111111100000000000000000000000000000000000000000000 + 45 19 0 1111111111111111111000000000000000000000000000000000000000000000 + 46 18 0 1111111111111111110000000000000000000000000000000000000000000000 + 47 17 0 1111111111111111100000000000000000000000000000000000000000000000 + 48 16 0 1111111111111111000000000000000000000000000000000000000000000000 + 49 15 0 1111111111111110000000000000000000000000000000000000000000000000 + 50 14 0 1111111111111100000000000000000000000000000000000000000000000000 + 51 13 0 1111111111111000000000000000000000000000000000000000000000000000 + 52 12 0 1111111111110000000000000000000000000000000000000000000000000000 + 53 11 0 1111111111100000000000000000000000000000000000000000000000000000 + 54 10 0 1111111111000000000000000000000000000000000000000000000000000000 + 55 9 0 1111111110000000000000000000000000000000000000000000000000000000 + 56 8 0 1111111100000000000000000000000000000000000000000000000000000000 + 57 7 0 1111111000000000000000000000000000000000000000000000000000000000 + 58 6 0 1111110000000000000000000000000000000000000000000000000000000000 + 59 5 0 1111100000000000000000000000000000000000000000000000000000000000 + 60 4 0 1111000000000000000000000000000000000000000000000000000000000000 + 61 3 0 1110000000000000000000000000000000000000000000000000000000000000 + 62 2 0 1100000000000000000000000000000000000000000000000000000000000000 + 63 1 0 1000000000000000000000000000000000000000000000000000000000000000 + +first 1 bit should move left 1 position each line + 0 0 -1 0000000000000000000000000000000000000000000000000000000000000000 + 1 0 63 0000000000000000000000000000000000000000000000000000000000000001 + 2 0 62 0000000000000000000000000000000000000000000000000000000000000011 + 3 0 61 0000000000000000000000000000000000000000000000000000000000000111 + 4 0 60 0000000000000000000000000000000000000000000000000000000000001111 + 5 0 59 0000000000000000000000000000000000000000000000000000000000011111 + 6 0 58 0000000000000000000000000000000000000000000000000000000000111111 + 7 0 57 0000000000000000000000000000000000000000000000000000000001111111 + 8 0 56 0000000000000000000000000000000000000000000000000000000011111111 + 9 0 55 0000000000000000000000000000000000000000000000000000000111111111 + 10 0 54 0000000000000000000000000000000000000000000000000000001111111111 + 11 0 53 0000000000000000000000000000000000000000000000000000011111111111 + 12 0 52 0000000000000000000000000000000000000000000000000000111111111111 + 13 0 51 0000000000000000000000000000000000000000000000000001111111111111 + 14 0 50 0000000000000000000000000000000000000000000000000011111111111111 + 15 0 49 0000000000000000000000000000000000000000000000000111111111111111 + 16 0 48 0000000000000000000000000000000000000000000000001111111111111111 + 17 0 47 0000000000000000000000000000000000000000000000011111111111111111 + 18 0 46 0000000000000000000000000000000000000000000000111111111111111111 + 19 0 45 0000000000000000000000000000000000000000000001111111111111111111 + 20 0 44 0000000000000000000000000000000000000000000011111111111111111111 + 21 0 43 0000000000000000000000000000000000000000000111111111111111111111 + 22 0 42 0000000000000000000000000000000000000000001111111111111111111111 + 23 0 41 0000000000000000000000000000000000000000011111111111111111111111 + 24 0 40 0000000000000000000000000000000000000000111111111111111111111111 + 25 0 39 0000000000000000000000000000000000000001111111111111111111111111 + 26 0 38 0000000000000000000000000000000000000011111111111111111111111111 + 27 0 37 0000000000000000000000000000000000000111111111111111111111111111 + 28 0 36 0000000000000000000000000000000000001111111111111111111111111111 + 29 0 35 0000000000000000000000000000000000011111111111111111111111111111 + 30 0 34 0000000000000000000000000000000000111111111111111111111111111111 + 31 0 33 0000000000000000000000000000000001111111111111111111111111111111 + 32 0 32 0000000000000000000000000000000011111111111111111111111111111111 + 33 0 31 0000000000000000000000000000000111111111111111111111111111111111 + 34 0 30 0000000000000000000000000000001111111111111111111111111111111111 + 35 0 29 0000000000000000000000000000011111111111111111111111111111111111 + 36 0 28 0000000000000000000000000000111111111111111111111111111111111111 + 37 0 27 0000000000000000000000000001111111111111111111111111111111111111 + 38 0 26 0000000000000000000000000011111111111111111111111111111111111111 + 39 0 25 0000000000000000000000000111111111111111111111111111111111111111 + 40 0 24 0000000000000000000000001111111111111111111111111111111111111111 + 41 0 23 0000000000000000000000011111111111111111111111111111111111111111 + 42 0 22 0000000000000000000000111111111111111111111111111111111111111111 + 43 0 21 0000000000000000000001111111111111111111111111111111111111111111 + 44 0 20 0000000000000000000011111111111111111111111111111111111111111111 + 45 0 19 0000000000000000000111111111111111111111111111111111111111111111 + 46 0 18 0000000000000000001111111111111111111111111111111111111111111111 + 47 0 17 0000000000000000011111111111111111111111111111111111111111111111 + 48 0 16 0000000000000000111111111111111111111111111111111111111111111111 + 49 0 15 0000000000000001111111111111111111111111111111111111111111111111 + 50 0 14 0000000000000011111111111111111111111111111111111111111111111111 + 51 0 13 0000000000000111111111111111111111111111111111111111111111111111 + 52 0 12 0000000000001111111111111111111111111111111111111111111111111111 + 53 0 11 0000000000011111111111111111111111111111111111111111111111111111 + 54 0 10 0000000000111111111111111111111111111111111111111111111111111111 + 55 0 9 0000000001111111111111111111111111111111111111111111111111111111 + 56 0 8 0000000011111111111111111111111111111111111111111111111111111111 + 57 0 7 0000000111111111111111111111111111111111111111111111111111111111 + 58 0 6 0000001111111111111111111111111111111111111111111111111111111111 + 59 0 5 0000011111111111111111111111111111111111111111111111111111111111 + 60 0 4 0000111111111111111111111111111111111111111111111111111111111111 + 61 0 3 0001111111111111111111111111111111111111111111111111111111111111 + 62 0 2 0011111111111111111111111111111111111111111111111111111111111111 + 63 0 1 0111111111111111111111111111111111111111111111111111111111111111 + +0 bit should move right 1 position each line + 0 0 1 0111111111111111111111111111111111111111111111111111111111111111 + 1 1 0 1011111111111111111111111111111111111111111111111111111111111111 + 2 2 0 1101111111111111111111111111111111111111111111111111111111111111 + 3 3 0 1110111111111111111111111111111111111111111111111111111111111111 + 4 4 0 1111011111111111111111111111111111111111111111111111111111111111 + 5 5 0 1111101111111111111111111111111111111111111111111111111111111111 + 6 6 0 1111110111111111111111111111111111111111111111111111111111111111 + 7 7 0 1111111011111111111111111111111111111111111111111111111111111111 + 8 8 0 1111111101111111111111111111111111111111111111111111111111111111 + 9 9 0 1111111110111111111111111111111111111111111111111111111111111111 + 10 10 0 1111111111011111111111111111111111111111111111111111111111111111 + 11 11 0 1111111111101111111111111111111111111111111111111111111111111111 + 12 12 0 1111111111110111111111111111111111111111111111111111111111111111 + 13 13 0 1111111111111011111111111111111111111111111111111111111111111111 + 14 14 0 1111111111111101111111111111111111111111111111111111111111111111 + 15 15 0 1111111111111110111111111111111111111111111111111111111111111111 + 16 16 0 1111111111111111011111111111111111111111111111111111111111111111 + 17 17 0 1111111111111111101111111111111111111111111111111111111111111111 + 18 18 0 1111111111111111110111111111111111111111111111111111111111111111 + 19 19 0 1111111111111111111011111111111111111111111111111111111111111111 + 20 20 0 1111111111111111111101111111111111111111111111111111111111111111 + 21 21 0 1111111111111111111110111111111111111111111111111111111111111111 + 22 22 0 1111111111111111111111011111111111111111111111111111111111111111 + 23 23 0 1111111111111111111111101111111111111111111111111111111111111111 + 24 24 0 1111111111111111111111110111111111111111111111111111111111111111 + 25 25 0 1111111111111111111111111011111111111111111111111111111111111111 + 26 26 0 1111111111111111111111111101111111111111111111111111111111111111 + 27 27 0 1111111111111111111111111110111111111111111111111111111111111111 + 28 28 0 1111111111111111111111111111011111111111111111111111111111111111 + 29 29 0 1111111111111111111111111111101111111111111111111111111111111111 + 30 30 0 1111111111111111111111111111110111111111111111111111111111111111 + 31 31 0 1111111111111111111111111111111011111111111111111111111111111111 + 32 32 0 1111111111111111111111111111111101111111111111111111111111111111 + 33 33 0 1111111111111111111111111111111110111111111111111111111111111111 + 34 34 0 1111111111111111111111111111111111011111111111111111111111111111 + 35 35 0 1111111111111111111111111111111111101111111111111111111111111111 + 36 36 0 1111111111111111111111111111111111110111111111111111111111111111 + 37 37 0 1111111111111111111111111111111111111011111111111111111111111111 + 38 38 0 1111111111111111111111111111111111111101111111111111111111111111 + 39 39 0 1111111111111111111111111111111111111110111111111111111111111111 + 40 40 0 1111111111111111111111111111111111111111011111111111111111111111 + 41 41 0 1111111111111111111111111111111111111111101111111111111111111111 + 42 42 0 1111111111111111111111111111111111111111110111111111111111111111 + 43 43 0 1111111111111111111111111111111111111111111011111111111111111111 + 44 44 0 1111111111111111111111111111111111111111111101111111111111111111 + 45 45 0 1111111111111111111111111111111111111111111110111111111111111111 + 46 46 0 1111111111111111111111111111111111111111111111011111111111111111 + 47 47 0 1111111111111111111111111111111111111111111111101111111111111111 + 48 48 0 1111111111111111111111111111111111111111111111110111111111111111 + 49 49 0 1111111111111111111111111111111111111111111111111011111111111111 + 50 50 0 1111111111111111111111111111111111111111111111111101111111111111 + 51 51 0 1111111111111111111111111111111111111111111111111110111111111111 + 52 52 0 1111111111111111111111111111111111111111111111111111011111111111 + 53 53 0 1111111111111111111111111111111111111111111111111111101111111111 + 54 54 0 1111111111111111111111111111111111111111111111111111110111111111 + 55 55 0 1111111111111111111111111111111111111111111111111111111011111111 + 56 56 0 1111111111111111111111111111111111111111111111111111111101111111 + 57 57 0 1111111111111111111111111111111111111111111111111111111110111111 + 58 58 0 1111111111111111111111111111111111111111111111111111111111011111 + 59 59 0 1111111111111111111111111111111111111111111111111111111111101111 + 60 60 0 1111111111111111111111111111111111111111111111111111111111110111 + 61 61 0 1111111111111111111111111111111111111111111111111111111111111011 + 62 62 0 1111111111111111111111111111111111111111111111111111111111111101 + 63 63 0 1111111111111111111111111111111111111111111111111111111111111110 + +1 bit should move right 1 position each line + 0 1 0 1000000000000000000000000000000000000000000000000000000000000000 + 1 0 1 0100000000000000000000000000000000000000000000000000000000000000 + 2 0 2 0010000000000000000000000000000000000000000000000000000000000000 + 3 0 3 0001000000000000000000000000000000000000000000000000000000000000 + 4 0 4 0000100000000000000000000000000000000000000000000000000000000000 + 5 0 5 0000010000000000000000000000000000000000000000000000000000000000 + 6 0 6 0000001000000000000000000000000000000000000000000000000000000000 + 7 0 7 0000000100000000000000000000000000000000000000000000000000000000 + 8 0 8 0000000010000000000000000000000000000000000000000000000000000000 + 9 0 9 0000000001000000000000000000000000000000000000000000000000000000 + 10 0 10 0000000000100000000000000000000000000000000000000000000000000000 + 11 0 11 0000000000010000000000000000000000000000000000000000000000000000 + 12 0 12 0000000000001000000000000000000000000000000000000000000000000000 + 13 0 13 0000000000000100000000000000000000000000000000000000000000000000 + 14 0 14 0000000000000010000000000000000000000000000000000000000000000000 + 15 0 15 0000000000000001000000000000000000000000000000000000000000000000 + 16 0 16 0000000000000000100000000000000000000000000000000000000000000000 + 17 0 17 0000000000000000010000000000000000000000000000000000000000000000 + 18 0 18 0000000000000000001000000000000000000000000000000000000000000000 + 19 0 19 0000000000000000000100000000000000000000000000000000000000000000 + 20 0 20 0000000000000000000010000000000000000000000000000000000000000000 + 21 0 21 0000000000000000000001000000000000000000000000000000000000000000 + 22 0 22 0000000000000000000000100000000000000000000000000000000000000000 + 23 0 23 0000000000000000000000010000000000000000000000000000000000000000 + 24 0 24 0000000000000000000000001000000000000000000000000000000000000000 + 25 0 25 0000000000000000000000000100000000000000000000000000000000000000 + 26 0 26 0000000000000000000000000010000000000000000000000000000000000000 + 27 0 27 0000000000000000000000000001000000000000000000000000000000000000 + 28 0 28 0000000000000000000000000000100000000000000000000000000000000000 + 29 0 29 0000000000000000000000000000010000000000000000000000000000000000 + 30 0 30 0000000000000000000000000000001000000000000000000000000000000000 + 31 0 31 0000000000000000000000000000000100000000000000000000000000000000 + 32 0 32 0000000000000000000000000000000010000000000000000000000000000000 + 33 0 33 0000000000000000000000000000000001000000000000000000000000000000 + 34 0 34 0000000000000000000000000000000000100000000000000000000000000000 + 35 0 35 0000000000000000000000000000000000010000000000000000000000000000 + 36 0 36 0000000000000000000000000000000000001000000000000000000000000000 + 37 0 37 0000000000000000000000000000000000000100000000000000000000000000 + 38 0 38 0000000000000000000000000000000000000010000000000000000000000000 + 39 0 39 0000000000000000000000000000000000000001000000000000000000000000 + 40 0 40 0000000000000000000000000000000000000000100000000000000000000000 + 41 0 41 0000000000000000000000000000000000000000010000000000000000000000 + 42 0 42 0000000000000000000000000000000000000000001000000000000000000000 + 43 0 43 0000000000000000000000000000000000000000000100000000000000000000 + 44 0 44 0000000000000000000000000000000000000000000010000000000000000000 + 45 0 45 0000000000000000000000000000000000000000000001000000000000000000 + 46 0 46 0000000000000000000000000000000000000000000000100000000000000000 + 47 0 47 0000000000000000000000000000000000000000000000010000000000000000 + 48 0 48 0000000000000000000000000000000000000000000000001000000000000000 + 49 0 49 0000000000000000000000000000000000000000000000000100000000000000 + 50 0 50 0000000000000000000000000000000000000000000000000010000000000000 + 51 0 51 0000000000000000000000000000000000000000000000000001000000000000 + 52 0 52 0000000000000000000000000000000000000000000000000000100000000000 + 53 0 53 0000000000000000000000000000000000000000000000000000010000000000 + 54 0 54 0000000000000000000000000000000000000000000000000000001000000000 + 55 0 55 0000000000000000000000000000000000000000000000000000000100000000 + 56 0 56 0000000000000000000000000000000000000000000000000000000010000000 + 57 0 57 0000000000000000000000000000000000000000000000000000000001000000 + 58 0 58 0000000000000000000000000000000000000000000000000000000000100000 + 59 0 59 0000000000000000000000000000000000000000000000000000000000010000 + 60 0 60 0000000000000000000000000000000000000000000000000000000000001000 + 61 0 61 0000000000000000000000000000000000000000000000000000000000000100 + 62 0 62 0000000000000000000000000000000000000000000000000000000000000010 + 63 0 63 0000000000000000000000000000000000000000000000000000000000000001 diff --git a/regress/include/bitstring/good/67 b/regress/include/bitstring/good/67 new file mode 100644 index 00000000000..e5decc3b4bd --- /dev/null +++ b/regress/include/bitstring/good/67 @@ -0,0 +1,583 @@ +Testing with TEST_LENGTH = 67 + +test _bit_byte, _bit_mask, and bitstr_size + i _bit_byte(i) _bit_mask(i) bitstr_size(i) + 0 0 1 0 + 1 0 2 1 + 2 0 4 1 + 3 0 8 1 + 4 0 16 1 + 5 0 32 1 + 6 0 64 1 + 7 0 128 1 + 8 1 1 1 + 9 1 2 2 + 10 1 4 2 + 11 1 8 2 + 12 1 16 2 + 13 1 32 2 + 14 1 64 2 + 15 1 128 2 + 16 2 1 2 + 17 2 2 3 + 18 2 4 3 + 19 2 8 3 + 20 2 16 3 + 21 2 32 3 + 22 2 64 3 + 23 2 128 3 + 24 3 1 3 + 25 3 2 4 + 26 3 4 4 + 27 3 8 4 + 28 3 16 4 + 29 3 32 4 + 30 3 64 4 + 31 3 128 4 + 32 4 1 4 + 33 4 2 5 + 34 4 4 5 + 35 4 8 5 + 36 4 16 5 + 37 4 32 5 + 38 4 64 5 + 39 4 128 5 + 40 5 1 5 + 41 5 2 6 + 42 5 4 6 + 43 5 8 6 + 44 5 16 6 + 45 5 32 6 + 46 5 64 6 + 47 5 128 6 + 48 6 1 6 + 49 6 2 7 + 50 6 4 7 + 51 6 8 7 + 52 6 16 7 + 53 6 32 7 + 54 6 64 7 + 55 6 128 7 + 56 7 1 7 + 57 7 2 8 + 58 7 4 8 + 59 7 8 8 + 60 7 16 8 + 61 7 32 8 + 62 7 64 8 + 63 7 128 8 + 64 8 1 8 + 65 8 2 9 + 66 8 4 9 + +test bit_alloc, clearbits, bit_ffc, bit_ffs +be: 0 -1 0000000000000000000000000000000000000000000000000000000000000000000 +is: 0 -1 0000000000000000000000000000000000000000000000000000000000000000000 + +test bit_set +be: 1 0 1001001001001001001001001001001001001001001001001001001001001001001 +is: 1 0 1001001001001001001001001001001001001001001001001001001001001001001 + +test bit_clear +be: 0 3 0001000001000001000001000001000001000001000001000001000001000001000 +is: 0 3 0001000001000001000001000001000001000001000001000001000001000001000 + +test bit_test using previous bitstring + i bit_test(i) + 0 0 + 1 0 + 2 0 + 3 8 + 4 0 + 5 0 + 6 0 + 7 0 + 8 0 + 9 2 + 10 0 + 11 0 + 12 0 + 13 0 + 14 0 + 15 128 + 16 0 + 17 0 + 18 0 + 19 0 + 20 0 + 21 32 + 22 0 + 23 0 + 24 0 + 25 0 + 26 0 + 27 8 + 28 0 + 29 0 + 30 0 + 31 0 + 32 0 + 33 2 + 34 0 + 35 0 + 36 0 + 37 0 + 38 0 + 39 128 + 40 0 + 41 0 + 42 0 + 43 0 + 44 0 + 45 32 + 46 0 + 47 0 + 48 0 + 49 0 + 50 0 + 51 8 + 52 0 + 53 0 + 54 0 + 55 0 + 56 0 + 57 2 + 58 0 + 59 0 + 60 0 + 61 0 + 62 0 + 63 128 + 64 0 + 65 0 + 66 0 + +test clearbits +be: 0 -1 0000000000000000000000000000000000000000000000000000000000000000000 +is: 0 -1 0000000000000000000000000000000000000000000000000000000000000000000 + +test bit_nset and bit_nclear +be: 0 1 0111111111111111111111111111111111111111111111111111111111111111110 +is: 0 1 0111111111111111111111111111111111111111111111111111111111111111110 +be: 0 1 0100000000000000000000000000000000000000000000000000000000000000010 +is: 0 1 0100000000000000000000000000000000000000000000000000000000000000010 +be: 0 -1 0000000000000000000000000000000000000000000000000000000000000000000 +is: 0 -1 0000000000000000000000000000000000000000000000000000000000000000000 +be: 66 0 1111111111111111111111111111111111111111111111111111111111111111110 +is: 66 0 1111111111111111111111111111111111111111111111111111111111111111110 +be: 0 -1 0000000000000000000000000000000000000000000000000000000000000000000 +is: 0 -1 0000000000000000000000000000000000000000000000000000000000000000000 + +first 1 bit should move right 1 position each line + 0 -1 0 1111111111111111111111111111111111111111111111111111111111111111111 + 1 0 1 0111111111111111111111111111111111111111111111111111111111111111111 + 2 0 2 0011111111111111111111111111111111111111111111111111111111111111111 + 3 0 3 0001111111111111111111111111111111111111111111111111111111111111111 + 4 0 4 0000111111111111111111111111111111111111111111111111111111111111111 + 5 0 5 0000011111111111111111111111111111111111111111111111111111111111111 + 6 0 6 0000001111111111111111111111111111111111111111111111111111111111111 + 7 0 7 0000000111111111111111111111111111111111111111111111111111111111111 + 8 0 8 0000000011111111111111111111111111111111111111111111111111111111111 + 9 0 9 0000000001111111111111111111111111111111111111111111111111111111111 + 10 0 10 0000000000111111111111111111111111111111111111111111111111111111111 + 11 0 11 0000000000011111111111111111111111111111111111111111111111111111111 + 12 0 12 0000000000001111111111111111111111111111111111111111111111111111111 + 13 0 13 0000000000000111111111111111111111111111111111111111111111111111111 + 14 0 14 0000000000000011111111111111111111111111111111111111111111111111111 + 15 0 15 0000000000000001111111111111111111111111111111111111111111111111111 + 16 0 16 0000000000000000111111111111111111111111111111111111111111111111111 + 17 0 17 0000000000000000011111111111111111111111111111111111111111111111111 + 18 0 18 0000000000000000001111111111111111111111111111111111111111111111111 + 19 0 19 0000000000000000000111111111111111111111111111111111111111111111111 + 20 0 20 0000000000000000000011111111111111111111111111111111111111111111111 + 21 0 21 0000000000000000000001111111111111111111111111111111111111111111111 + 22 0 22 0000000000000000000000111111111111111111111111111111111111111111111 + 23 0 23 0000000000000000000000011111111111111111111111111111111111111111111 + 24 0 24 0000000000000000000000001111111111111111111111111111111111111111111 + 25 0 25 0000000000000000000000000111111111111111111111111111111111111111111 + 26 0 26 0000000000000000000000000011111111111111111111111111111111111111111 + 27 0 27 0000000000000000000000000001111111111111111111111111111111111111111 + 28 0 28 0000000000000000000000000000111111111111111111111111111111111111111 + 29 0 29 0000000000000000000000000000011111111111111111111111111111111111111 + 30 0 30 0000000000000000000000000000001111111111111111111111111111111111111 + 31 0 31 0000000000000000000000000000000111111111111111111111111111111111111 + 32 0 32 0000000000000000000000000000000011111111111111111111111111111111111 + 33 0 33 0000000000000000000000000000000001111111111111111111111111111111111 + 34 0 34 0000000000000000000000000000000000111111111111111111111111111111111 + 35 0 35 0000000000000000000000000000000000011111111111111111111111111111111 + 36 0 36 0000000000000000000000000000000000001111111111111111111111111111111 + 37 0 37 0000000000000000000000000000000000000111111111111111111111111111111 + 38 0 38 0000000000000000000000000000000000000011111111111111111111111111111 + 39 0 39 0000000000000000000000000000000000000001111111111111111111111111111 + 40 0 40 0000000000000000000000000000000000000000111111111111111111111111111 + 41 0 41 0000000000000000000000000000000000000000011111111111111111111111111 + 42 0 42 0000000000000000000000000000000000000000001111111111111111111111111 + 43 0 43 0000000000000000000000000000000000000000000111111111111111111111111 + 44 0 44 0000000000000000000000000000000000000000000011111111111111111111111 + 45 0 45 0000000000000000000000000000000000000000000001111111111111111111111 + 46 0 46 0000000000000000000000000000000000000000000000111111111111111111111 + 47 0 47 0000000000000000000000000000000000000000000000011111111111111111111 + 48 0 48 0000000000000000000000000000000000000000000000001111111111111111111 + 49 0 49 0000000000000000000000000000000000000000000000000111111111111111111 + 50 0 50 0000000000000000000000000000000000000000000000000011111111111111111 + 51 0 51 0000000000000000000000000000000000000000000000000001111111111111111 + 52 0 52 0000000000000000000000000000000000000000000000000000111111111111111 + 53 0 53 0000000000000000000000000000000000000000000000000000011111111111111 + 54 0 54 0000000000000000000000000000000000000000000000000000001111111111111 + 55 0 55 0000000000000000000000000000000000000000000000000000000111111111111 + 56 0 56 0000000000000000000000000000000000000000000000000000000011111111111 + 57 0 57 0000000000000000000000000000000000000000000000000000000001111111111 + 58 0 58 0000000000000000000000000000000000000000000000000000000000111111111 + 59 0 59 0000000000000000000000000000000000000000000000000000000000011111111 + 60 0 60 0000000000000000000000000000000000000000000000000000000000001111111 + 61 0 61 0000000000000000000000000000000000000000000000000000000000000111111 + 62 0 62 0000000000000000000000000000000000000000000000000000000000000011111 + 63 0 63 0000000000000000000000000000000000000000000000000000000000000001111 + 64 0 64 0000000000000000000000000000000000000000000000000000000000000000111 + 65 0 65 0000000000000000000000000000000000000000000000000000000000000000011 + 66 0 66 0000000000000000000000000000000000000000000000000000000000000000001 + +first 0 bit should move right 1 position each line + 0 0 -1 0000000000000000000000000000000000000000000000000000000000000000000 + 1 1 0 1000000000000000000000000000000000000000000000000000000000000000000 + 2 2 0 1100000000000000000000000000000000000000000000000000000000000000000 + 3 3 0 1110000000000000000000000000000000000000000000000000000000000000000 + 4 4 0 1111000000000000000000000000000000000000000000000000000000000000000 + 5 5 0 1111100000000000000000000000000000000000000000000000000000000000000 + 6 6 0 1111110000000000000000000000000000000000000000000000000000000000000 + 7 7 0 1111111000000000000000000000000000000000000000000000000000000000000 + 8 8 0 1111111100000000000000000000000000000000000000000000000000000000000 + 9 9 0 1111111110000000000000000000000000000000000000000000000000000000000 + 10 10 0 1111111111000000000000000000000000000000000000000000000000000000000 + 11 11 0 1111111111100000000000000000000000000000000000000000000000000000000 + 12 12 0 1111111111110000000000000000000000000000000000000000000000000000000 + 13 13 0 1111111111111000000000000000000000000000000000000000000000000000000 + 14 14 0 1111111111111100000000000000000000000000000000000000000000000000000 + 15 15 0 1111111111111110000000000000000000000000000000000000000000000000000 + 16 16 0 1111111111111111000000000000000000000000000000000000000000000000000 + 17 17 0 1111111111111111100000000000000000000000000000000000000000000000000 + 18 18 0 1111111111111111110000000000000000000000000000000000000000000000000 + 19 19 0 1111111111111111111000000000000000000000000000000000000000000000000 + 20 20 0 1111111111111111111100000000000000000000000000000000000000000000000 + 21 21 0 1111111111111111111110000000000000000000000000000000000000000000000 + 22 22 0 1111111111111111111111000000000000000000000000000000000000000000000 + 23 23 0 1111111111111111111111100000000000000000000000000000000000000000000 + 24 24 0 1111111111111111111111110000000000000000000000000000000000000000000 + 25 25 0 1111111111111111111111111000000000000000000000000000000000000000000 + 26 26 0 1111111111111111111111111100000000000000000000000000000000000000000 + 27 27 0 1111111111111111111111111110000000000000000000000000000000000000000 + 28 28 0 1111111111111111111111111111000000000000000000000000000000000000000 + 29 29 0 1111111111111111111111111111100000000000000000000000000000000000000 + 30 30 0 1111111111111111111111111111110000000000000000000000000000000000000 + 31 31 0 1111111111111111111111111111111000000000000000000000000000000000000 + 32 32 0 1111111111111111111111111111111100000000000000000000000000000000000 + 33 33 0 1111111111111111111111111111111110000000000000000000000000000000000 + 34 34 0 1111111111111111111111111111111111000000000000000000000000000000000 + 35 35 0 1111111111111111111111111111111111100000000000000000000000000000000 + 36 36 0 1111111111111111111111111111111111110000000000000000000000000000000 + 37 37 0 1111111111111111111111111111111111111000000000000000000000000000000 + 38 38 0 1111111111111111111111111111111111111100000000000000000000000000000 + 39 39 0 1111111111111111111111111111111111111110000000000000000000000000000 + 40 40 0 1111111111111111111111111111111111111111000000000000000000000000000 + 41 41 0 1111111111111111111111111111111111111111100000000000000000000000000 + 42 42 0 1111111111111111111111111111111111111111110000000000000000000000000 + 43 43 0 1111111111111111111111111111111111111111111000000000000000000000000 + 44 44 0 1111111111111111111111111111111111111111111100000000000000000000000 + 45 45 0 1111111111111111111111111111111111111111111110000000000000000000000 + 46 46 0 1111111111111111111111111111111111111111111111000000000000000000000 + 47 47 0 1111111111111111111111111111111111111111111111100000000000000000000 + 48 48 0 1111111111111111111111111111111111111111111111110000000000000000000 + 49 49 0 1111111111111111111111111111111111111111111111111000000000000000000 + 50 50 0 1111111111111111111111111111111111111111111111111100000000000000000 + 51 51 0 1111111111111111111111111111111111111111111111111110000000000000000 + 52 52 0 1111111111111111111111111111111111111111111111111111000000000000000 + 53 53 0 1111111111111111111111111111111111111111111111111111100000000000000 + 54 54 0 1111111111111111111111111111111111111111111111111111110000000000000 + 55 55 0 1111111111111111111111111111111111111111111111111111111000000000000 + 56 56 0 1111111111111111111111111111111111111111111111111111111100000000000 + 57 57 0 1111111111111111111111111111111111111111111111111111111110000000000 + 58 58 0 1111111111111111111111111111111111111111111111111111111111000000000 + 59 59 0 1111111111111111111111111111111111111111111111111111111111100000000 + 60 60 0 1111111111111111111111111111111111111111111111111111111111110000000 + 61 61 0 1111111111111111111111111111111111111111111111111111111111111000000 + 62 62 0 1111111111111111111111111111111111111111111111111111111111111100000 + 63 63 0 1111111111111111111111111111111111111111111111111111111111111110000 + 64 64 0 1111111111111111111111111111111111111111111111111111111111111111000 + 65 65 0 1111111111111111111111111111111111111111111111111111111111111111100 + 66 66 0 1111111111111111111111111111111111111111111111111111111111111111110 + +first 0 bit should move left 1 position each line + 0 -1 0 1111111111111111111111111111111111111111111111111111111111111111111 + 1 66 0 1111111111111111111111111111111111111111111111111111111111111111110 + 2 65 0 1111111111111111111111111111111111111111111111111111111111111111100 + 3 64 0 1111111111111111111111111111111111111111111111111111111111111111000 + 4 63 0 1111111111111111111111111111111111111111111111111111111111111110000 + 5 62 0 1111111111111111111111111111111111111111111111111111111111111100000 + 6 61 0 1111111111111111111111111111111111111111111111111111111111111000000 + 7 60 0 1111111111111111111111111111111111111111111111111111111111110000000 + 8 59 0 1111111111111111111111111111111111111111111111111111111111100000000 + 9 58 0 1111111111111111111111111111111111111111111111111111111111000000000 + 10 57 0 1111111111111111111111111111111111111111111111111111111110000000000 + 11 56 0 1111111111111111111111111111111111111111111111111111111100000000000 + 12 55 0 1111111111111111111111111111111111111111111111111111111000000000000 + 13 54 0 1111111111111111111111111111111111111111111111111111110000000000000 + 14 53 0 1111111111111111111111111111111111111111111111111111100000000000000 + 15 52 0 1111111111111111111111111111111111111111111111111111000000000000000 + 16 51 0 1111111111111111111111111111111111111111111111111110000000000000000 + 17 50 0 1111111111111111111111111111111111111111111111111100000000000000000 + 18 49 0 1111111111111111111111111111111111111111111111111000000000000000000 + 19 48 0 1111111111111111111111111111111111111111111111110000000000000000000 + 20 47 0 1111111111111111111111111111111111111111111111100000000000000000000 + 21 46 0 1111111111111111111111111111111111111111111111000000000000000000000 + 22 45 0 1111111111111111111111111111111111111111111110000000000000000000000 + 23 44 0 1111111111111111111111111111111111111111111100000000000000000000000 + 24 43 0 1111111111111111111111111111111111111111111000000000000000000000000 + 25 42 0 1111111111111111111111111111111111111111110000000000000000000000000 + 26 41 0 1111111111111111111111111111111111111111100000000000000000000000000 + 27 40 0 1111111111111111111111111111111111111111000000000000000000000000000 + 28 39 0 1111111111111111111111111111111111111110000000000000000000000000000 + 29 38 0 1111111111111111111111111111111111111100000000000000000000000000000 + 30 37 0 1111111111111111111111111111111111111000000000000000000000000000000 + 31 36 0 1111111111111111111111111111111111110000000000000000000000000000000 + 32 35 0 1111111111111111111111111111111111100000000000000000000000000000000 + 33 34 0 1111111111111111111111111111111111000000000000000000000000000000000 + 34 33 0 1111111111111111111111111111111110000000000000000000000000000000000 + 35 32 0 1111111111111111111111111111111100000000000000000000000000000000000 + 36 31 0 1111111111111111111111111111111000000000000000000000000000000000000 + 37 30 0 1111111111111111111111111111110000000000000000000000000000000000000 + 38 29 0 1111111111111111111111111111100000000000000000000000000000000000000 + 39 28 0 1111111111111111111111111111000000000000000000000000000000000000000 + 40 27 0 1111111111111111111111111110000000000000000000000000000000000000000 + 41 26 0 1111111111111111111111111100000000000000000000000000000000000000000 + 42 25 0 1111111111111111111111111000000000000000000000000000000000000000000 + 43 24 0 1111111111111111111111110000000000000000000000000000000000000000000 + 44 23 0 1111111111111111111111100000000000000000000000000000000000000000000 + 45 22 0 1111111111111111111111000000000000000000000000000000000000000000000 + 46 21 0 1111111111111111111110000000000000000000000000000000000000000000000 + 47 20 0 1111111111111111111100000000000000000000000000000000000000000000000 + 48 19 0 1111111111111111111000000000000000000000000000000000000000000000000 + 49 18 0 1111111111111111110000000000000000000000000000000000000000000000000 + 50 17 0 1111111111111111100000000000000000000000000000000000000000000000000 + 51 16 0 1111111111111111000000000000000000000000000000000000000000000000000 + 52 15 0 1111111111111110000000000000000000000000000000000000000000000000000 + 53 14 0 1111111111111100000000000000000000000000000000000000000000000000000 + 54 13 0 1111111111111000000000000000000000000000000000000000000000000000000 + 55 12 0 1111111111110000000000000000000000000000000000000000000000000000000 + 56 11 0 1111111111100000000000000000000000000000000000000000000000000000000 + 57 10 0 1111111111000000000000000000000000000000000000000000000000000000000 + 58 9 0 1111111110000000000000000000000000000000000000000000000000000000000 + 59 8 0 1111111100000000000000000000000000000000000000000000000000000000000 + 60 7 0 1111111000000000000000000000000000000000000000000000000000000000000 + 61 6 0 1111110000000000000000000000000000000000000000000000000000000000000 + 62 5 0 1111100000000000000000000000000000000000000000000000000000000000000 + 63 4 0 1111000000000000000000000000000000000000000000000000000000000000000 + 64 3 0 1110000000000000000000000000000000000000000000000000000000000000000 + 65 2 0 1100000000000000000000000000000000000000000000000000000000000000000 + 66 1 0 1000000000000000000000000000000000000000000000000000000000000000000 + +first 1 bit should move left 1 position each line + 0 0 -1 0000000000000000000000000000000000000000000000000000000000000000000 + 1 0 66 0000000000000000000000000000000000000000000000000000000000000000001 + 2 0 65 0000000000000000000000000000000000000000000000000000000000000000011 + 3 0 64 0000000000000000000000000000000000000000000000000000000000000000111 + 4 0 63 0000000000000000000000000000000000000000000000000000000000000001111 + 5 0 62 0000000000000000000000000000000000000000000000000000000000000011111 + 6 0 61 0000000000000000000000000000000000000000000000000000000000000111111 + 7 0 60 0000000000000000000000000000000000000000000000000000000000001111111 + 8 0 59 0000000000000000000000000000000000000000000000000000000000011111111 + 9 0 58 0000000000000000000000000000000000000000000000000000000000111111111 + 10 0 57 0000000000000000000000000000000000000000000000000000000001111111111 + 11 0 56 0000000000000000000000000000000000000000000000000000000011111111111 + 12 0 55 0000000000000000000000000000000000000000000000000000000111111111111 + 13 0 54 0000000000000000000000000000000000000000000000000000001111111111111 + 14 0 53 0000000000000000000000000000000000000000000000000000011111111111111 + 15 0 52 0000000000000000000000000000000000000000000000000000111111111111111 + 16 0 51 0000000000000000000000000000000000000000000000000001111111111111111 + 17 0 50 0000000000000000000000000000000000000000000000000011111111111111111 + 18 0 49 0000000000000000000000000000000000000000000000000111111111111111111 + 19 0 48 0000000000000000000000000000000000000000000000001111111111111111111 + 20 0 47 0000000000000000000000000000000000000000000000011111111111111111111 + 21 0 46 0000000000000000000000000000000000000000000000111111111111111111111 + 22 0 45 0000000000000000000000000000000000000000000001111111111111111111111 + 23 0 44 0000000000000000000000000000000000000000000011111111111111111111111 + 24 0 43 0000000000000000000000000000000000000000000111111111111111111111111 + 25 0 42 0000000000000000000000000000000000000000001111111111111111111111111 + 26 0 41 0000000000000000000000000000000000000000011111111111111111111111111 + 27 0 40 0000000000000000000000000000000000000000111111111111111111111111111 + 28 0 39 0000000000000000000000000000000000000001111111111111111111111111111 + 29 0 38 0000000000000000000000000000000000000011111111111111111111111111111 + 30 0 37 0000000000000000000000000000000000000111111111111111111111111111111 + 31 0 36 0000000000000000000000000000000000001111111111111111111111111111111 + 32 0 35 0000000000000000000000000000000000011111111111111111111111111111111 + 33 0 34 0000000000000000000000000000000000111111111111111111111111111111111 + 34 0 33 0000000000000000000000000000000001111111111111111111111111111111111 + 35 0 32 0000000000000000000000000000000011111111111111111111111111111111111 + 36 0 31 0000000000000000000000000000000111111111111111111111111111111111111 + 37 0 30 0000000000000000000000000000001111111111111111111111111111111111111 + 38 0 29 0000000000000000000000000000011111111111111111111111111111111111111 + 39 0 28 0000000000000000000000000000111111111111111111111111111111111111111 + 40 0 27 0000000000000000000000000001111111111111111111111111111111111111111 + 41 0 26 0000000000000000000000000011111111111111111111111111111111111111111 + 42 0 25 0000000000000000000000000111111111111111111111111111111111111111111 + 43 0 24 0000000000000000000000001111111111111111111111111111111111111111111 + 44 0 23 0000000000000000000000011111111111111111111111111111111111111111111 + 45 0 22 0000000000000000000000111111111111111111111111111111111111111111111 + 46 0 21 0000000000000000000001111111111111111111111111111111111111111111111 + 47 0 20 0000000000000000000011111111111111111111111111111111111111111111111 + 48 0 19 0000000000000000000111111111111111111111111111111111111111111111111 + 49 0 18 0000000000000000001111111111111111111111111111111111111111111111111 + 50 0 17 0000000000000000011111111111111111111111111111111111111111111111111 + 51 0 16 0000000000000000111111111111111111111111111111111111111111111111111 + 52 0 15 0000000000000001111111111111111111111111111111111111111111111111111 + 53 0 14 0000000000000011111111111111111111111111111111111111111111111111111 + 54 0 13 0000000000000111111111111111111111111111111111111111111111111111111 + 55 0 12 0000000000001111111111111111111111111111111111111111111111111111111 + 56 0 11 0000000000011111111111111111111111111111111111111111111111111111111 + 57 0 10 0000000000111111111111111111111111111111111111111111111111111111111 + 58 0 9 0000000001111111111111111111111111111111111111111111111111111111111 + 59 0 8 0000000011111111111111111111111111111111111111111111111111111111111 + 60 0 7 0000000111111111111111111111111111111111111111111111111111111111111 + 61 0 6 0000001111111111111111111111111111111111111111111111111111111111111 + 62 0 5 0000011111111111111111111111111111111111111111111111111111111111111 + 63 0 4 0000111111111111111111111111111111111111111111111111111111111111111 + 64 0 3 0001111111111111111111111111111111111111111111111111111111111111111 + 65 0 2 0011111111111111111111111111111111111111111111111111111111111111111 + 66 0 1 0111111111111111111111111111111111111111111111111111111111111111111 + +0 bit should move right 1 position each line + 0 0 1 0111111111111111111111111111111111111111111111111111111111111111111 + 1 1 0 1011111111111111111111111111111111111111111111111111111111111111111 + 2 2 0 1101111111111111111111111111111111111111111111111111111111111111111 + 3 3 0 1110111111111111111111111111111111111111111111111111111111111111111 + 4 4 0 1111011111111111111111111111111111111111111111111111111111111111111 + 5 5 0 1111101111111111111111111111111111111111111111111111111111111111111 + 6 6 0 1111110111111111111111111111111111111111111111111111111111111111111 + 7 7 0 1111111011111111111111111111111111111111111111111111111111111111111 + 8 8 0 1111111101111111111111111111111111111111111111111111111111111111111 + 9 9 0 1111111110111111111111111111111111111111111111111111111111111111111 + 10 10 0 1111111111011111111111111111111111111111111111111111111111111111111 + 11 11 0 1111111111101111111111111111111111111111111111111111111111111111111 + 12 12 0 1111111111110111111111111111111111111111111111111111111111111111111 + 13 13 0 1111111111111011111111111111111111111111111111111111111111111111111 + 14 14 0 1111111111111101111111111111111111111111111111111111111111111111111 + 15 15 0 1111111111111110111111111111111111111111111111111111111111111111111 + 16 16 0 1111111111111111011111111111111111111111111111111111111111111111111 + 17 17 0 1111111111111111101111111111111111111111111111111111111111111111111 + 18 18 0 1111111111111111110111111111111111111111111111111111111111111111111 + 19 19 0 1111111111111111111011111111111111111111111111111111111111111111111 + 20 20 0 1111111111111111111101111111111111111111111111111111111111111111111 + 21 21 0 1111111111111111111110111111111111111111111111111111111111111111111 + 22 22 0 1111111111111111111111011111111111111111111111111111111111111111111 + 23 23 0 1111111111111111111111101111111111111111111111111111111111111111111 + 24 24 0 1111111111111111111111110111111111111111111111111111111111111111111 + 25 25 0 1111111111111111111111111011111111111111111111111111111111111111111 + 26 26 0 1111111111111111111111111101111111111111111111111111111111111111111 + 27 27 0 1111111111111111111111111110111111111111111111111111111111111111111 + 28 28 0 1111111111111111111111111111011111111111111111111111111111111111111 + 29 29 0 1111111111111111111111111111101111111111111111111111111111111111111 + 30 30 0 1111111111111111111111111111110111111111111111111111111111111111111 + 31 31 0 1111111111111111111111111111111011111111111111111111111111111111111 + 32 32 0 1111111111111111111111111111111101111111111111111111111111111111111 + 33 33 0 1111111111111111111111111111111110111111111111111111111111111111111 + 34 34 0 1111111111111111111111111111111111011111111111111111111111111111111 + 35 35 0 1111111111111111111111111111111111101111111111111111111111111111111 + 36 36 0 1111111111111111111111111111111111110111111111111111111111111111111 + 37 37 0 1111111111111111111111111111111111111011111111111111111111111111111 + 38 38 0 1111111111111111111111111111111111111101111111111111111111111111111 + 39 39 0 1111111111111111111111111111111111111110111111111111111111111111111 + 40 40 0 1111111111111111111111111111111111111111011111111111111111111111111 + 41 41 0 1111111111111111111111111111111111111111101111111111111111111111111 + 42 42 0 1111111111111111111111111111111111111111110111111111111111111111111 + 43 43 0 1111111111111111111111111111111111111111111011111111111111111111111 + 44 44 0 1111111111111111111111111111111111111111111101111111111111111111111 + 45 45 0 1111111111111111111111111111111111111111111110111111111111111111111 + 46 46 0 1111111111111111111111111111111111111111111111011111111111111111111 + 47 47 0 1111111111111111111111111111111111111111111111101111111111111111111 + 48 48 0 1111111111111111111111111111111111111111111111110111111111111111111 + 49 49 0 1111111111111111111111111111111111111111111111111011111111111111111 + 50 50 0 1111111111111111111111111111111111111111111111111101111111111111111 + 51 51 0 1111111111111111111111111111111111111111111111111110111111111111111 + 52 52 0 1111111111111111111111111111111111111111111111111111011111111111111 + 53 53 0 1111111111111111111111111111111111111111111111111111101111111111111 + 54 54 0 1111111111111111111111111111111111111111111111111111110111111111111 + 55 55 0 1111111111111111111111111111111111111111111111111111111011111111111 + 56 56 0 1111111111111111111111111111111111111111111111111111111101111111111 + 57 57 0 1111111111111111111111111111111111111111111111111111111110111111111 + 58 58 0 1111111111111111111111111111111111111111111111111111111111011111111 + 59 59 0 1111111111111111111111111111111111111111111111111111111111101111111 + 60 60 0 1111111111111111111111111111111111111111111111111111111111110111111 + 61 61 0 1111111111111111111111111111111111111111111111111111111111111011111 + 62 62 0 1111111111111111111111111111111111111111111111111111111111111101111 + 63 63 0 1111111111111111111111111111111111111111111111111111111111111110111 + 64 64 0 1111111111111111111111111111111111111111111111111111111111111111011 + 65 65 0 1111111111111111111111111111111111111111111111111111111111111111101 + 66 66 0 1111111111111111111111111111111111111111111111111111111111111111110 + +1 bit should move right 1 position each line + 0 1 0 1000000000000000000000000000000000000000000000000000000000000000000 + 1 0 1 0100000000000000000000000000000000000000000000000000000000000000000 + 2 0 2 0010000000000000000000000000000000000000000000000000000000000000000 + 3 0 3 0001000000000000000000000000000000000000000000000000000000000000000 + 4 0 4 0000100000000000000000000000000000000000000000000000000000000000000 + 5 0 5 0000010000000000000000000000000000000000000000000000000000000000000 + 6 0 6 0000001000000000000000000000000000000000000000000000000000000000000 + 7 0 7 0000000100000000000000000000000000000000000000000000000000000000000 + 8 0 8 0000000010000000000000000000000000000000000000000000000000000000000 + 9 0 9 0000000001000000000000000000000000000000000000000000000000000000000 + 10 0 10 0000000000100000000000000000000000000000000000000000000000000000000 + 11 0 11 0000000000010000000000000000000000000000000000000000000000000000000 + 12 0 12 0000000000001000000000000000000000000000000000000000000000000000000 + 13 0 13 0000000000000100000000000000000000000000000000000000000000000000000 + 14 0 14 0000000000000010000000000000000000000000000000000000000000000000000 + 15 0 15 0000000000000001000000000000000000000000000000000000000000000000000 + 16 0 16 0000000000000000100000000000000000000000000000000000000000000000000 + 17 0 17 0000000000000000010000000000000000000000000000000000000000000000000 + 18 0 18 0000000000000000001000000000000000000000000000000000000000000000000 + 19 0 19 0000000000000000000100000000000000000000000000000000000000000000000 + 20 0 20 0000000000000000000010000000000000000000000000000000000000000000000 + 21 0 21 0000000000000000000001000000000000000000000000000000000000000000000 + 22 0 22 0000000000000000000000100000000000000000000000000000000000000000000 + 23 0 23 0000000000000000000000010000000000000000000000000000000000000000000 + 24 0 24 0000000000000000000000001000000000000000000000000000000000000000000 + 25 0 25 0000000000000000000000000100000000000000000000000000000000000000000 + 26 0 26 0000000000000000000000000010000000000000000000000000000000000000000 + 27 0 27 0000000000000000000000000001000000000000000000000000000000000000000 + 28 0 28 0000000000000000000000000000100000000000000000000000000000000000000 + 29 0 29 0000000000000000000000000000010000000000000000000000000000000000000 + 30 0 30 0000000000000000000000000000001000000000000000000000000000000000000 + 31 0 31 0000000000000000000000000000000100000000000000000000000000000000000 + 32 0 32 0000000000000000000000000000000010000000000000000000000000000000000 + 33 0 33 0000000000000000000000000000000001000000000000000000000000000000000 + 34 0 34 0000000000000000000000000000000000100000000000000000000000000000000 + 35 0 35 0000000000000000000000000000000000010000000000000000000000000000000 + 36 0 36 0000000000000000000000000000000000001000000000000000000000000000000 + 37 0 37 0000000000000000000000000000000000000100000000000000000000000000000 + 38 0 38 0000000000000000000000000000000000000010000000000000000000000000000 + 39 0 39 0000000000000000000000000000000000000001000000000000000000000000000 + 40 0 40 0000000000000000000000000000000000000000100000000000000000000000000 + 41 0 41 0000000000000000000000000000000000000000010000000000000000000000000 + 42 0 42 0000000000000000000000000000000000000000001000000000000000000000000 + 43 0 43 0000000000000000000000000000000000000000000100000000000000000000000 + 44 0 44 0000000000000000000000000000000000000000000010000000000000000000000 + 45 0 45 0000000000000000000000000000000000000000000001000000000000000000000 + 46 0 46 0000000000000000000000000000000000000000000000100000000000000000000 + 47 0 47 0000000000000000000000000000000000000000000000010000000000000000000 + 48 0 48 0000000000000000000000000000000000000000000000001000000000000000000 + 49 0 49 0000000000000000000000000000000000000000000000000100000000000000000 + 50 0 50 0000000000000000000000000000000000000000000000000010000000000000000 + 51 0 51 0000000000000000000000000000000000000000000000000001000000000000000 + 52 0 52 0000000000000000000000000000000000000000000000000000100000000000000 + 53 0 53 0000000000000000000000000000000000000000000000000000010000000000000 + 54 0 54 0000000000000000000000000000000000000000000000000000001000000000000 + 55 0 55 0000000000000000000000000000000000000000000000000000000100000000000 + 56 0 56 0000000000000000000000000000000000000000000000000000000010000000000 + 57 0 57 0000000000000000000000000000000000000000000000000000000001000000000 + 58 0 58 0000000000000000000000000000000000000000000000000000000000100000000 + 59 0 59 0000000000000000000000000000000000000000000000000000000000010000000 + 60 0 60 0000000000000000000000000000000000000000000000000000000000001000000 + 61 0 61 0000000000000000000000000000000000000000000000000000000000000100000 + 62 0 62 0000000000000000000000000000000000000000000000000000000000000010000 + 63 0 63 0000000000000000000000000000000000000000000000000000000000000001000 + 64 0 64 0000000000000000000000000000000000000000000000000000000000000000100 + 65 0 65 0000000000000000000000000000000000000000000000000000000000000000010 + 66 0 66 0000000000000000000000000000000000000000000000000000000000000000001 diff --git a/regress/include/bitstring/good/8 b/regress/include/bitstring/good/8 new file mode 100644 index 00000000000..aba64404b45 --- /dev/null +++ b/regress/include/bitstring/good/8 @@ -0,0 +1,111 @@ +Testing with TEST_LENGTH = 8 + +test _bit_byte, _bit_mask, and bitstr_size + i _bit_byte(i) _bit_mask(i) bitstr_size(i) + 0 0 1 0 + 1 0 2 1 + 2 0 4 1 + 3 0 8 1 + 4 0 16 1 + 5 0 32 1 + 6 0 64 1 + 7 0 128 1 + +test bit_alloc, clearbits, bit_ffc, bit_ffs +be: 0 -1 00000000 +is: 0 -1 00000000 + +test bit_set +be: 1 0 10010010 +is: 1 0 10010010 + +test bit_clear +be: 0 3 00010000 +is: 0 3 00010000 + +test bit_test using previous bitstring + i bit_test(i) + 0 0 + 1 0 + 2 0 + 3 8 + 4 0 + 5 0 + 6 0 + 7 0 + +test clearbits +be: 0 -1 00000000 +is: 0 -1 00000000 + +test bit_nset and bit_nclear +be: 0 1 01111110 +is: 0 1 01111110 +be: 0 1 01000010 +is: 0 1 01000010 +be: 0 -1 00000000 +is: 0 -1 00000000 +be: 7 0 11111110 +is: 7 0 11111110 +be: 0 -1 00000000 +is: 0 -1 00000000 + +first 1 bit should move right 1 position each line + 0 -1 0 11111111 + 1 0 1 01111111 + 2 0 2 00111111 + 3 0 3 00011111 + 4 0 4 00001111 + 5 0 5 00000111 + 6 0 6 00000011 + 7 0 7 00000001 + +first 0 bit should move right 1 position each line + 0 0 -1 00000000 + 1 1 0 10000000 + 2 2 0 11000000 + 3 3 0 11100000 + 4 4 0 11110000 + 5 5 0 11111000 + 6 6 0 11111100 + 7 7 0 11111110 + +first 0 bit should move left 1 position each line + 0 -1 0 11111111 + 1 7 0 11111110 + 2 6 0 11111100 + 3 5 0 11111000 + 4 4 0 11110000 + 5 3 0 11100000 + 6 2 0 11000000 + 7 1 0 10000000 + +first 1 bit should move left 1 position each line + 0 0 -1 00000000 + 1 0 7 00000001 + 2 0 6 00000011 + 3 0 5 00000111 + 4 0 4 00001111 + 5 0 3 00011111 + 6 0 2 00111111 + 7 0 1 01111111 + +0 bit should move right 1 position each line + 0 0 1 01111111 + 1 1 0 10111111 + 2 2 0 11011111 + 3 3 0 11101111 + 4 4 0 11110111 + 5 5 0 11111011 + 6 6 0 11111101 + 7 7 0 11111110 + +1 bit should move right 1 position each line + 0 1 0 10000000 + 1 0 1 01000000 + 2 0 2 00100000 + 3 0 3 00010000 + 4 0 4 00001000 + 5 0 5 00000100 + 6 0 6 00000010 + 7 0 7 00000001 |