1 Testing with TEST_LENGTH = 49
3 test _bit_byte, _bit_mask, and bitstr_size
4 i _bit_byte(i) _bit_mask(i) bitstr_size(i)
55 test bit_alloc, clearbits, bit_ffc, bit_ffs
56 be: 0 -1 0000000000000000000000000000000000000000000000000
57 is: 0 -1 0000000000000000000000000000000000000000000000000
60 be: 1 0 1001001001001001001001001001001001001001001001001
61 is: 1 0 1001001001001001001001001001001001001001001001001
64 be: 0 3 0001000001000001000001000001000001000001000001000
65 is: 0 3 0001000001000001000001000001000001000001000001000
67 test bit_test using previous bitstring
120 be: 0 -1 0000000000000000000000000000000000000000000000000
121 is: 0 -1 0000000000000000000000000000000000000000000000000
123 test bit_nset and bit_nclear
124 be: 0 1 0111111111111111111111111111111111111111111111110
125 is: 0 1 0111111111111111111111111111111111111111111111110
126 be: 0 1 0100000000000000000000000000000000000000000000010
127 is: 0 1 0100000000000000000000000000000000000000000000010
128 be: 0 -1 0000000000000000000000000000000000000000000000000
129 is: 0 -1 0000000000000000000000000000000000000000000000000
130 be: 48 0 1111111111111111111111111111111111111111111111110
131 is: 48 0 1111111111111111111111111111111111111111111111110
132 be: 0 -1 0000000000000000000000000000000000000000000000000
133 is: 0 -1 0000000000000000000000000000000000000000000000000
135 first 1 bit should move right 1 position each line
136 0 -1 0 1111111111111111111111111111111111111111111111111
137 1 0 1 0111111111111111111111111111111111111111111111111
138 2 0 2 0011111111111111111111111111111111111111111111111
139 3 0 3 0001111111111111111111111111111111111111111111111
140 4 0 4 0000111111111111111111111111111111111111111111111
141 5 0 5 0000011111111111111111111111111111111111111111111
142 6 0 6 0000001111111111111111111111111111111111111111111
143 7 0 7 0000000111111111111111111111111111111111111111111
144 8 0 8 0000000011111111111111111111111111111111111111111
145 9 0 9 0000000001111111111111111111111111111111111111111
146 10 0 10 0000000000111111111111111111111111111111111111111
147 11 0 11 0000000000011111111111111111111111111111111111111
148 12 0 12 0000000000001111111111111111111111111111111111111
149 13 0 13 0000000000000111111111111111111111111111111111111
150 14 0 14 0000000000000011111111111111111111111111111111111
151 15 0 15 0000000000000001111111111111111111111111111111111
152 16 0 16 0000000000000000111111111111111111111111111111111
153 17 0 17 0000000000000000011111111111111111111111111111111
154 18 0 18 0000000000000000001111111111111111111111111111111
155 19 0 19 0000000000000000000111111111111111111111111111111
156 20 0 20 0000000000000000000011111111111111111111111111111
157 21 0 21 0000000000000000000001111111111111111111111111111
158 22 0 22 0000000000000000000000111111111111111111111111111
159 23 0 23 0000000000000000000000011111111111111111111111111
160 24 0 24 0000000000000000000000001111111111111111111111111
161 25 0 25 0000000000000000000000000111111111111111111111111
162 26 0 26 0000000000000000000000000011111111111111111111111
163 27 0 27 0000000000000000000000000001111111111111111111111
164 28 0 28 0000000000000000000000000000111111111111111111111
165 29 0 29 0000000000000000000000000000011111111111111111111
166 30 0 30 0000000000000000000000000000001111111111111111111
167 31 0 31 0000000000000000000000000000000111111111111111111
168 32 0 32 0000000000000000000000000000000011111111111111111
169 33 0 33 0000000000000000000000000000000001111111111111111
170 34 0 34 0000000000000000000000000000000000111111111111111
171 35 0 35 0000000000000000000000000000000000011111111111111
172 36 0 36 0000000000000000000000000000000000001111111111111
173 37 0 37 0000000000000000000000000000000000000111111111111
174 38 0 38 0000000000000000000000000000000000000011111111111
175 39 0 39 0000000000000000000000000000000000000001111111111
176 40 0 40 0000000000000000000000000000000000000000111111111
177 41 0 41 0000000000000000000000000000000000000000011111111
178 42 0 42 0000000000000000000000000000000000000000001111111
179 43 0 43 0000000000000000000000000000000000000000000111111
180 44 0 44 0000000000000000000000000000000000000000000011111
181 45 0 45 0000000000000000000000000000000000000000000001111
182 46 0 46 0000000000000000000000000000000000000000000000111
183 47 0 47 0000000000000000000000000000000000000000000000011
184 48 0 48 0000000000000000000000000000000000000000000000001
186 first 0 bit should move right 1 position each line
187 0 0 -1 0000000000000000000000000000000000000000000000000
188 1 1 0 1000000000000000000000000000000000000000000000000
189 2 2 0 1100000000000000000000000000000000000000000000000
190 3 3 0 1110000000000000000000000000000000000000000000000
191 4 4 0 1111000000000000000000000000000000000000000000000
192 5 5 0 1111100000000000000000000000000000000000000000000
193 6 6 0 1111110000000000000000000000000000000000000000000
194 7 7 0 1111111000000000000000000000000000000000000000000
195 8 8 0 1111111100000000000000000000000000000000000000000
196 9 9 0 1111111110000000000000000000000000000000000000000
197 10 10 0 1111111111000000000000000000000000000000000000000
198 11 11 0 1111111111100000000000000000000000000000000000000
199 12 12 0 1111111111110000000000000000000000000000000000000
200 13 13 0 1111111111111000000000000000000000000000000000000
201 14 14 0 1111111111111100000000000000000000000000000000000
202 15 15 0 1111111111111110000000000000000000000000000000000
203 16 16 0 1111111111111111000000000000000000000000000000000
204 17 17 0 1111111111111111100000000000000000000000000000000
205 18 18 0 1111111111111111110000000000000000000000000000000
206 19 19 0 1111111111111111111000000000000000000000000000000
207 20 20 0 1111111111111111111100000000000000000000000000000
208 21 21 0 1111111111111111111110000000000000000000000000000
209 22 22 0 1111111111111111111111000000000000000000000000000
210 23 23 0 1111111111111111111111100000000000000000000000000
211 24 24 0 1111111111111111111111110000000000000000000000000
212 25 25 0 1111111111111111111111111000000000000000000000000
213 26 26 0 1111111111111111111111111100000000000000000000000
214 27 27 0 1111111111111111111111111110000000000000000000000
215 28 28 0 1111111111111111111111111111000000000000000000000
216 29 29 0 1111111111111111111111111111100000000000000000000
217 30 30 0 1111111111111111111111111111110000000000000000000
218 31 31 0 1111111111111111111111111111111000000000000000000
219 32 32 0 1111111111111111111111111111111100000000000000000
220 33 33 0 1111111111111111111111111111111110000000000000000
221 34 34 0 1111111111111111111111111111111111000000000000000
222 35 35 0 1111111111111111111111111111111111100000000000000
223 36 36 0 1111111111111111111111111111111111110000000000000
224 37 37 0 1111111111111111111111111111111111111000000000000
225 38 38 0 1111111111111111111111111111111111111100000000000
226 39 39 0 1111111111111111111111111111111111111110000000000
227 40 40 0 1111111111111111111111111111111111111111000000000
228 41 41 0 1111111111111111111111111111111111111111100000000
229 42 42 0 1111111111111111111111111111111111111111110000000
230 43 43 0 1111111111111111111111111111111111111111111000000
231 44 44 0 1111111111111111111111111111111111111111111100000
232 45 45 0 1111111111111111111111111111111111111111111110000
233 46 46 0 1111111111111111111111111111111111111111111111000
234 47 47 0 1111111111111111111111111111111111111111111111100
235 48 48 0 1111111111111111111111111111111111111111111111110
237 first 0 bit should move left 1 position each line
238 0 -1 0 1111111111111111111111111111111111111111111111111
239 1 48 0 1111111111111111111111111111111111111111111111110
240 2 47 0 1111111111111111111111111111111111111111111111100
241 3 46 0 1111111111111111111111111111111111111111111111000
242 4 45 0 1111111111111111111111111111111111111111111110000
243 5 44 0 1111111111111111111111111111111111111111111100000
244 6 43 0 1111111111111111111111111111111111111111111000000
245 7 42 0 1111111111111111111111111111111111111111110000000
246 8 41 0 1111111111111111111111111111111111111111100000000
247 9 40 0 1111111111111111111111111111111111111111000000000
248 10 39 0 1111111111111111111111111111111111111110000000000
249 11 38 0 1111111111111111111111111111111111111100000000000
250 12 37 0 1111111111111111111111111111111111111000000000000
251 13 36 0 1111111111111111111111111111111111110000000000000
252 14 35 0 1111111111111111111111111111111111100000000000000
253 15 34 0 1111111111111111111111111111111111000000000000000
254 16 33 0 1111111111111111111111111111111110000000000000000
255 17 32 0 1111111111111111111111111111111100000000000000000
256 18 31 0 1111111111111111111111111111111000000000000000000
257 19 30 0 1111111111111111111111111111110000000000000000000
258 20 29 0 1111111111111111111111111111100000000000000000000
259 21 28 0 1111111111111111111111111111000000000000000000000
260 22 27 0 1111111111111111111111111110000000000000000000000
261 23 26 0 1111111111111111111111111100000000000000000000000
262 24 25 0 1111111111111111111111111000000000000000000000000
263 25 24 0 1111111111111111111111110000000000000000000000000
264 26 23 0 1111111111111111111111100000000000000000000000000
265 27 22 0 1111111111111111111111000000000000000000000000000
266 28 21 0 1111111111111111111110000000000000000000000000000
267 29 20 0 1111111111111111111100000000000000000000000000000
268 30 19 0 1111111111111111111000000000000000000000000000000
269 31 18 0 1111111111111111110000000000000000000000000000000
270 32 17 0 1111111111111111100000000000000000000000000000000
271 33 16 0 1111111111111111000000000000000000000000000000000
272 34 15 0 1111111111111110000000000000000000000000000000000
273 35 14 0 1111111111111100000000000000000000000000000000000
274 36 13 0 1111111111111000000000000000000000000000000000000
275 37 12 0 1111111111110000000000000000000000000000000000000
276 38 11 0 1111111111100000000000000000000000000000000000000
277 39 10 0 1111111111000000000000000000000000000000000000000
278 40 9 0 1111111110000000000000000000000000000000000000000
279 41 8 0 1111111100000000000000000000000000000000000000000
280 42 7 0 1111111000000000000000000000000000000000000000000
281 43 6 0 1111110000000000000000000000000000000000000000000
282 44 5 0 1111100000000000000000000000000000000000000000000
283 45 4 0 1111000000000000000000000000000000000000000000000
284 46 3 0 1110000000000000000000000000000000000000000000000
285 47 2 0 1100000000000000000000000000000000000000000000000
286 48 1 0 1000000000000000000000000000000000000000000000000
288 first 1 bit should move left 1 position each line
289 0 0 -1 0000000000000000000000000000000000000000000000000
290 1 0 48 0000000000000000000000000000000000000000000000001
291 2 0 47 0000000000000000000000000000000000000000000000011
292 3 0 46 0000000000000000000000000000000000000000000000111
293 4 0 45 0000000000000000000000000000000000000000000001111
294 5 0 44 0000000000000000000000000000000000000000000011111
295 6 0 43 0000000000000000000000000000000000000000000111111
296 7 0 42 0000000000000000000000000000000000000000001111111
297 8 0 41 0000000000000000000000000000000000000000011111111
298 9 0 40 0000000000000000000000000000000000000000111111111
299 10 0 39 0000000000000000000000000000000000000001111111111
300 11 0 38 0000000000000000000000000000000000000011111111111
301 12 0 37 0000000000000000000000000000000000000111111111111
302 13 0 36 0000000000000000000000000000000000001111111111111
303 14 0 35 0000000000000000000000000000000000011111111111111
304 15 0 34 0000000000000000000000000000000000111111111111111
305 16 0 33 0000000000000000000000000000000001111111111111111
306 17 0 32 0000000000000000000000000000000011111111111111111
307 18 0 31 0000000000000000000000000000000111111111111111111
308 19 0 30 0000000000000000000000000000001111111111111111111
309 20 0 29 0000000000000000000000000000011111111111111111111
310 21 0 28 0000000000000000000000000000111111111111111111111
311 22 0 27 0000000000000000000000000001111111111111111111111
312 23 0 26 0000000000000000000000000011111111111111111111111
313 24 0 25 0000000000000000000000000111111111111111111111111
314 25 0 24 0000000000000000000000001111111111111111111111111
315 26 0 23 0000000000000000000000011111111111111111111111111
316 27 0 22 0000000000000000000000111111111111111111111111111
317 28 0 21 0000000000000000000001111111111111111111111111111
318 29 0 20 0000000000000000000011111111111111111111111111111
319 30 0 19 0000000000000000000111111111111111111111111111111
320 31 0 18 0000000000000000001111111111111111111111111111111
321 32 0 17 0000000000000000011111111111111111111111111111111
322 33 0 16 0000000000000000111111111111111111111111111111111
323 34 0 15 0000000000000001111111111111111111111111111111111
324 35 0 14 0000000000000011111111111111111111111111111111111
325 36 0 13 0000000000000111111111111111111111111111111111111
326 37 0 12 0000000000001111111111111111111111111111111111111
327 38 0 11 0000000000011111111111111111111111111111111111111
328 39 0 10 0000000000111111111111111111111111111111111111111
329 40 0 9 0000000001111111111111111111111111111111111111111
330 41 0 8 0000000011111111111111111111111111111111111111111
331 42 0 7 0000000111111111111111111111111111111111111111111
332 43 0 6 0000001111111111111111111111111111111111111111111
333 44 0 5 0000011111111111111111111111111111111111111111111
334 45 0 4 0000111111111111111111111111111111111111111111111
335 46 0 3 0001111111111111111111111111111111111111111111111
336 47 0 2 0011111111111111111111111111111111111111111111111
337 48 0 1 0111111111111111111111111111111111111111111111111
339 0 bit should move right 1 position each line
340 0 0 1 0111111111111111111111111111111111111111111111111
341 1 1 0 1011111111111111111111111111111111111111111111111
342 2 2 0 1101111111111111111111111111111111111111111111111
343 3 3 0 1110111111111111111111111111111111111111111111111
344 4 4 0 1111011111111111111111111111111111111111111111111
345 5 5 0 1111101111111111111111111111111111111111111111111
346 6 6 0 1111110111111111111111111111111111111111111111111
347 7 7 0 1111111011111111111111111111111111111111111111111
348 8 8 0 1111111101111111111111111111111111111111111111111
349 9 9 0 1111111110111111111111111111111111111111111111111
350 10 10 0 1111111111011111111111111111111111111111111111111
351 11 11 0 1111111111101111111111111111111111111111111111111
352 12 12 0 1111111111110111111111111111111111111111111111111
353 13 13 0 1111111111111011111111111111111111111111111111111
354 14 14 0 1111111111111101111111111111111111111111111111111
355 15 15 0 1111111111111110111111111111111111111111111111111
356 16 16 0 1111111111111111011111111111111111111111111111111
357 17 17 0 1111111111111111101111111111111111111111111111111
358 18 18 0 1111111111111111110111111111111111111111111111111
359 19 19 0 1111111111111111111011111111111111111111111111111
360 20 20 0 1111111111111111111101111111111111111111111111111
361 21 21 0 1111111111111111111110111111111111111111111111111
362 22 22 0 1111111111111111111111011111111111111111111111111
363 23 23 0 1111111111111111111111101111111111111111111111111
364 24 24 0 1111111111111111111111110111111111111111111111111
365 25 25 0 1111111111111111111111111011111111111111111111111
366 26 26 0 1111111111111111111111111101111111111111111111111
367 27 27 0 1111111111111111111111111110111111111111111111111
368 28 28 0 1111111111111111111111111111011111111111111111111
369 29 29 0 1111111111111111111111111111101111111111111111111
370 30 30 0 1111111111111111111111111111110111111111111111111
371 31 31 0 1111111111111111111111111111111011111111111111111
372 32 32 0 1111111111111111111111111111111101111111111111111
373 33 33 0 1111111111111111111111111111111110111111111111111
374 34 34 0 1111111111111111111111111111111111011111111111111
375 35 35 0 1111111111111111111111111111111111101111111111111
376 36 36 0 1111111111111111111111111111111111110111111111111
377 37 37 0 1111111111111111111111111111111111111011111111111
378 38 38 0 1111111111111111111111111111111111111101111111111
379 39 39 0 1111111111111111111111111111111111111110111111111
380 40 40 0 1111111111111111111111111111111111111111011111111
381 41 41 0 1111111111111111111111111111111111111111101111111
382 42 42 0 1111111111111111111111111111111111111111110111111
383 43 43 0 1111111111111111111111111111111111111111111011111
384 44 44 0 1111111111111111111111111111111111111111111101111
385 45 45 0 1111111111111111111111111111111111111111111110111
386 46 46 0 1111111111111111111111111111111111111111111111011
387 47 47 0 1111111111111111111111111111111111111111111111101
388 48 48 0 1111111111111111111111111111111111111111111111110
390 1 bit should move right 1 position each line
391 0 1 0 1000000000000000000000000000000000000000000000000
392 1 0 1 0100000000000000000000000000000000000000000000000
393 2 0 2 0010000000000000000000000000000000000000000000000
394 3 0 3 0001000000000000000000000000000000000000000000000
395 4 0 4 0000100000000000000000000000000000000000000000000
396 5 0 5 0000010000000000000000000000000000000000000000000
397 6 0 6 0000001000000000000000000000000000000000000000000
398 7 0 7 0000000100000000000000000000000000000000000000000
399 8 0 8 0000000010000000000000000000000000000000000000000
400 9 0 9 0000000001000000000000000000000000000000000000000
401 10 0 10 0000000000100000000000000000000000000000000000000
402 11 0 11 0000000000010000000000000000000000000000000000000
403 12 0 12 0000000000001000000000000000000000000000000000000
404 13 0 13 0000000000000100000000000000000000000000000000000
405 14 0 14 0000000000000010000000000000000000000000000000000
406 15 0 15 0000000000000001000000000000000000000000000000000
407 16 0 16 0000000000000000100000000000000000000000000000000
408 17 0 17 0000000000000000010000000000000000000000000000000
409 18 0 18 0000000000000000001000000000000000000000000000000
410 19 0 19 0000000000000000000100000000000000000000000000000
411 20 0 20 0000000000000000000010000000000000000000000000000
412 21 0 21 0000000000000000000001000000000000000000000000000
413 22 0 22 0000000000000000000000100000000000000000000000000
414 23 0 23 0000000000000000000000010000000000000000000000000
415 24 0 24 0000000000000000000000001000000000000000000000000
416 25 0 25 0000000000000000000000000100000000000000000000000
417 26 0 26 0000000000000000000000000010000000000000000000000
418 27 0 27 0000000000000000000000000001000000000000000000000
419 28 0 28 0000000000000000000000000000100000000000000000000
420 29 0 29 0000000000000000000000000000010000000000000000000
421 30 0 30 0000000000000000000000000000001000000000000000000
422 31 0 31 0000000000000000000000000000000100000000000000000
423 32 0 32 0000000000000000000000000000000010000000000000000
424 33 0 33 0000000000000000000000000000000001000000000000000
425 34 0 34 0000000000000000000000000000000000100000000000000
426 35 0 35 0000000000000000000000000000000000010000000000000
427 36 0 36 0000000000000000000000000000000000001000000000000
428 37 0 37 0000000000000000000000000000000000000100000000000
429 38 0 38 0000000000000000000000000000000000000010000000000
430 39 0 39 0000000000000000000000000000000000000001000000000
431 40 0 40 0000000000000000000000000000000000000000100000000
432 41 0 41 0000000000000000000000000000000000000000010000000
433 42 0 42 0000000000000000000000000000000000000000001000000
434 43 0 43 0000000000000000000000000000000000000000000100000
435 44 0 44 0000000000000000000000000000000000000000000010000
436 45 0 45 0000000000000000000000000000000000000000000001000
437 46 0 46 0000000000000000000000000000000000000000000000100
438 47 0 47 0000000000000000000000000000000000000000000000010
439 48 0 48 0000000000000000000000000000000000000000000000001