1 Testing with TEST_LENGTH = 27
3 test _bit_byte, _bit_mask, and bitstr_size
4 i _bit_byte(i) _bit_mask(i) bitstr_size(i)
33 test bit_alloc, clearbits, bit_ffc, bit_ffs
34 be: 0 -1 000000000000000000000000000
35 is: 0 -1 000000000000000000000000000
38 be: 1 0 100100100100100100100100100
39 is: 1 0 100100100100100100100100100
42 be: 0 3 000100000100000100000100000
43 is: 0 3 000100000100000100000100000
45 test bit_test using previous bitstring
76 be: 0 -1 000000000000000000000000000
77 is: 0 -1 000000000000000000000000000
79 test bit_nset and bit_nclear
80 be: 0 1 011111111111111111111111110
81 is: 0 1 011111111111111111111111110
82 be: 0 1 010000000000000000000000010
83 is: 0 1 010000000000000000000000010
84 be: 0 -1 000000000000000000000000000
85 is: 0 -1 000000000000000000000000000
86 be: 26 0 111111111111111111111111110
87 is: 26 0 111111111111111111111111110
88 be: 0 -1 000000000000000000000000000
89 is: 0 -1 000000000000000000000000000
91 first 1 bit should move right 1 position each line
92 0 -1 0 111111111111111111111111111
93 1 0 1 011111111111111111111111111
94 2 0 2 001111111111111111111111111
95 3 0 3 000111111111111111111111111
96 4 0 4 000011111111111111111111111
97 5 0 5 000001111111111111111111111
98 6 0 6 000000111111111111111111111
99 7 0 7 000000011111111111111111111
100 8 0 8 000000001111111111111111111
101 9 0 9 000000000111111111111111111
102 10 0 10 000000000011111111111111111
103 11 0 11 000000000001111111111111111
104 12 0 12 000000000000111111111111111
105 13 0 13 000000000000011111111111111
106 14 0 14 000000000000001111111111111
107 15 0 15 000000000000000111111111111
108 16 0 16 000000000000000011111111111
109 17 0 17 000000000000000001111111111
110 18 0 18 000000000000000000111111111
111 19 0 19 000000000000000000011111111
112 20 0 20 000000000000000000001111111
113 21 0 21 000000000000000000000111111
114 22 0 22 000000000000000000000011111
115 23 0 23 000000000000000000000001111
116 24 0 24 000000000000000000000000111
117 25 0 25 000000000000000000000000011
118 26 0 26 000000000000000000000000001
120 first 0 bit should move right 1 position each line
121 0 0 -1 000000000000000000000000000
122 1 1 0 100000000000000000000000000
123 2 2 0 110000000000000000000000000
124 3 3 0 111000000000000000000000000
125 4 4 0 111100000000000000000000000
126 5 5 0 111110000000000000000000000
127 6 6 0 111111000000000000000000000
128 7 7 0 111111100000000000000000000
129 8 8 0 111111110000000000000000000
130 9 9 0 111111111000000000000000000
131 10 10 0 111111111100000000000000000
132 11 11 0 111111111110000000000000000
133 12 12 0 111111111111000000000000000
134 13 13 0 111111111111100000000000000
135 14 14 0 111111111111110000000000000
136 15 15 0 111111111111111000000000000
137 16 16 0 111111111111111100000000000
138 17 17 0 111111111111111110000000000
139 18 18 0 111111111111111111000000000
140 19 19 0 111111111111111111100000000
141 20 20 0 111111111111111111110000000
142 21 21 0 111111111111111111111000000
143 22 22 0 111111111111111111111100000
144 23 23 0 111111111111111111111110000
145 24 24 0 111111111111111111111111000
146 25 25 0 111111111111111111111111100
147 26 26 0 111111111111111111111111110
149 first 0 bit should move left 1 position each line
150 0 -1 0 111111111111111111111111111
151 1 26 0 111111111111111111111111110
152 2 25 0 111111111111111111111111100
153 3 24 0 111111111111111111111111000
154 4 23 0 111111111111111111111110000
155 5 22 0 111111111111111111111100000
156 6 21 0 111111111111111111111000000
157 7 20 0 111111111111111111110000000
158 8 19 0 111111111111111111100000000
159 9 18 0 111111111111111111000000000
160 10 17 0 111111111111111110000000000
161 11 16 0 111111111111111100000000000
162 12 15 0 111111111111111000000000000
163 13 14 0 111111111111110000000000000
164 14 13 0 111111111111100000000000000
165 15 12 0 111111111111000000000000000
166 16 11 0 111111111110000000000000000
167 17 10 0 111111111100000000000000000
168 18 9 0 111111111000000000000000000
169 19 8 0 111111110000000000000000000
170 20 7 0 111111100000000000000000000
171 21 6 0 111111000000000000000000000
172 22 5 0 111110000000000000000000000
173 23 4 0 111100000000000000000000000
174 24 3 0 111000000000000000000000000
175 25 2 0 110000000000000000000000000
176 26 1 0 100000000000000000000000000
178 first 1 bit should move left 1 position each line
179 0 0 -1 000000000000000000000000000
180 1 0 26 000000000000000000000000001
181 2 0 25 000000000000000000000000011
182 3 0 24 000000000000000000000000111
183 4 0 23 000000000000000000000001111
184 5 0 22 000000000000000000000011111
185 6 0 21 000000000000000000000111111
186 7 0 20 000000000000000000001111111
187 8 0 19 000000000000000000011111111
188 9 0 18 000000000000000000111111111
189 10 0 17 000000000000000001111111111
190 11 0 16 000000000000000011111111111
191 12 0 15 000000000000000111111111111
192 13 0 14 000000000000001111111111111
193 14 0 13 000000000000011111111111111
194 15 0 12 000000000000111111111111111
195 16 0 11 000000000001111111111111111
196 17 0 10 000000000011111111111111111
197 18 0 9 000000000111111111111111111
198 19 0 8 000000001111111111111111111
199 20 0 7 000000011111111111111111111
200 21 0 6 000000111111111111111111111
201 22 0 5 000001111111111111111111111
202 23 0 4 000011111111111111111111111
203 24 0 3 000111111111111111111111111
204 25 0 2 001111111111111111111111111
205 26 0 1 011111111111111111111111111
207 0 bit should move right 1 position each line
208 0 0 1 011111111111111111111111111
209 1 1 0 101111111111111111111111111
210 2 2 0 110111111111111111111111111
211 3 3 0 111011111111111111111111111
212 4 4 0 111101111111111111111111111
213 5 5 0 111110111111111111111111111
214 6 6 0 111111011111111111111111111
215 7 7 0 111111101111111111111111111
216 8 8 0 111111110111111111111111111
217 9 9 0 111111111011111111111111111
218 10 10 0 111111111101111111111111111
219 11 11 0 111111111110111111111111111
220 12 12 0 111111111111011111111111111
221 13 13 0 111111111111101111111111111
222 14 14 0 111111111111110111111111111
223 15 15 0 111111111111111011111111111
224 16 16 0 111111111111111101111111111
225 17 17 0 111111111111111110111111111
226 18 18 0 111111111111111111011111111
227 19 19 0 111111111111111111101111111
228 20 20 0 111111111111111111110111111
229 21 21 0 111111111111111111111011111
230 22 22 0 111111111111111111111101111
231 23 23 0 111111111111111111111110111
232 24 24 0 111111111111111111111111011
233 25 25 0 111111111111111111111111101
234 26 26 0 111111111111111111111111110
236 1 bit should move right 1 position each line
237 0 1 0 100000000000000000000000000
238 1 0 1 010000000000000000000000000
239 2 0 2 001000000000000000000000000
240 3 0 3 000100000000000000000000000
241 4 0 4 000010000000000000000000000
242 5 0 5 000001000000000000000000000
243 6 0 6 000000100000000000000000000
244 7 0 7 000000010000000000000000000
245 8 0 8 000000001000000000000000000
246 9 0 9 000000000100000000000000000
247 10 0 10 000000000010000000000000000
248 11 0 11 000000000001000000000000000
249 12 0 12 000000000000100000000000000
250 13 0 13 000000000000010000000000000
251 14 0 14 000000000000001000000000000
252 15 0 15 000000000000000100000000000
253 16 0 16 000000000000000010000000000
254 17 0 17 000000000000000001000000000
255 18 0 18 000000000000000000100000000
256 19 0 19 000000000000000000010000000
257 20 0 20 000000000000000000001000000
258 21 0 21 000000000000000000000100000
259 22 0 22 000000000000000000000010000
260 23 0 23 000000000000000000000001000
261 24 0 24 000000000000000000000000100
262 25 0 25 000000000000000000000000010
263 26 0 26 000000000000000000000000001