1 Testing with TEST_LENGTH = 32
3 test _bit_byte, _bit_mask, and bitstr_size
4 i _bit_byte(i) _bit_mask(i) bitstr_size(i)
38 test bit_alloc, clearbits, bit_ffc, bit_ffs
39 be: 0 -1 00000000000000000000000000000000
40 is: 0 -1 00000000000000000000000000000000
43 be: 1 0 10010010010010010010010010010010
44 is: 1 0 10010010010010010010010010010010
47 be: 0 3 00010000010000010000010000010000
48 is: 0 3 00010000010000010000010000010000
50 test bit_test using previous bitstring
86 be: 0 -1 00000000000000000000000000000000
87 is: 0 -1 00000000000000000000000000000000
89 test bit_nset and bit_nclear
90 be: 0 1 01111111111111111111111111111110
91 is: 0 1 01111111111111111111111111111110
92 be: 0 1 01000000000000000000000000000010
93 is: 0 1 01000000000000000000000000000010
94 be: 0 -1 00000000000000000000000000000000
95 is: 0 -1 00000000000000000000000000000000
96 be: 31 0 11111111111111111111111111111110
97 is: 31 0 11111111111111111111111111111110
98 be: 0 -1 00000000000000000000000000000000
99 is: 0 -1 00000000000000000000000000000000
101 first 1 bit should move right 1 position each line
102 0 -1 0 11111111111111111111111111111111
103 1 0 1 01111111111111111111111111111111
104 2 0 2 00111111111111111111111111111111
105 3 0 3 00011111111111111111111111111111
106 4 0 4 00001111111111111111111111111111
107 5 0 5 00000111111111111111111111111111
108 6 0 6 00000011111111111111111111111111
109 7 0 7 00000001111111111111111111111111
110 8 0 8 00000000111111111111111111111111
111 9 0 9 00000000011111111111111111111111
112 10 0 10 00000000001111111111111111111111
113 11 0 11 00000000000111111111111111111111
114 12 0 12 00000000000011111111111111111111
115 13 0 13 00000000000001111111111111111111
116 14 0 14 00000000000000111111111111111111
117 15 0 15 00000000000000011111111111111111
118 16 0 16 00000000000000001111111111111111
119 17 0 17 00000000000000000111111111111111
120 18 0 18 00000000000000000011111111111111
121 19 0 19 00000000000000000001111111111111
122 20 0 20 00000000000000000000111111111111
123 21 0 21 00000000000000000000011111111111
124 22 0 22 00000000000000000000001111111111
125 23 0 23 00000000000000000000000111111111
126 24 0 24 00000000000000000000000011111111
127 25 0 25 00000000000000000000000001111111
128 26 0 26 00000000000000000000000000111111
129 27 0 27 00000000000000000000000000011111
130 28 0 28 00000000000000000000000000001111
131 29 0 29 00000000000000000000000000000111
132 30 0 30 00000000000000000000000000000011
133 31 0 31 00000000000000000000000000000001
135 first 0 bit should move right 1 position each line
136 0 0 -1 00000000000000000000000000000000
137 1 1 0 10000000000000000000000000000000
138 2 2 0 11000000000000000000000000000000
139 3 3 0 11100000000000000000000000000000
140 4 4 0 11110000000000000000000000000000
141 5 5 0 11111000000000000000000000000000
142 6 6 0 11111100000000000000000000000000
143 7 7 0 11111110000000000000000000000000
144 8 8 0 11111111000000000000000000000000
145 9 9 0 11111111100000000000000000000000
146 10 10 0 11111111110000000000000000000000
147 11 11 0 11111111111000000000000000000000
148 12 12 0 11111111111100000000000000000000
149 13 13 0 11111111111110000000000000000000
150 14 14 0 11111111111111000000000000000000
151 15 15 0 11111111111111100000000000000000
152 16 16 0 11111111111111110000000000000000
153 17 17 0 11111111111111111000000000000000
154 18 18 0 11111111111111111100000000000000
155 19 19 0 11111111111111111110000000000000
156 20 20 0 11111111111111111111000000000000
157 21 21 0 11111111111111111111100000000000
158 22 22 0 11111111111111111111110000000000
159 23 23 0 11111111111111111111111000000000
160 24 24 0 11111111111111111111111100000000
161 25 25 0 11111111111111111111111110000000
162 26 26 0 11111111111111111111111111000000
163 27 27 0 11111111111111111111111111100000
164 28 28 0 11111111111111111111111111110000
165 29 29 0 11111111111111111111111111111000
166 30 30 0 11111111111111111111111111111100
167 31 31 0 11111111111111111111111111111110
169 first 0 bit should move left 1 position each line
170 0 -1 0 11111111111111111111111111111111
171 1 31 0 11111111111111111111111111111110
172 2 30 0 11111111111111111111111111111100
173 3 29 0 11111111111111111111111111111000
174 4 28 0 11111111111111111111111111110000
175 5 27 0 11111111111111111111111111100000
176 6 26 0 11111111111111111111111111000000
177 7 25 0 11111111111111111111111110000000
178 8 24 0 11111111111111111111111100000000
179 9 23 0 11111111111111111111111000000000
180 10 22 0 11111111111111111111110000000000
181 11 21 0 11111111111111111111100000000000
182 12 20 0 11111111111111111111000000000000
183 13 19 0 11111111111111111110000000000000
184 14 18 0 11111111111111111100000000000000
185 15 17 0 11111111111111111000000000000000
186 16 16 0 11111111111111110000000000000000
187 17 15 0 11111111111111100000000000000000
188 18 14 0 11111111111111000000000000000000
189 19 13 0 11111111111110000000000000000000
190 20 12 0 11111111111100000000000000000000
191 21 11 0 11111111111000000000000000000000
192 22 10 0 11111111110000000000000000000000
193 23 9 0 11111111100000000000000000000000
194 24 8 0 11111111000000000000000000000000
195 25 7 0 11111110000000000000000000000000
196 26 6 0 11111100000000000000000000000000
197 27 5 0 11111000000000000000000000000000
198 28 4 0 11110000000000000000000000000000
199 29 3 0 11100000000000000000000000000000
200 30 2 0 11000000000000000000000000000000
201 31 1 0 10000000000000000000000000000000
203 first 1 bit should move left 1 position each line
204 0 0 -1 00000000000000000000000000000000
205 1 0 31 00000000000000000000000000000001
206 2 0 30 00000000000000000000000000000011
207 3 0 29 00000000000000000000000000000111
208 4 0 28 00000000000000000000000000001111
209 5 0 27 00000000000000000000000000011111
210 6 0 26 00000000000000000000000000111111
211 7 0 25 00000000000000000000000001111111
212 8 0 24 00000000000000000000000011111111
213 9 0 23 00000000000000000000000111111111
214 10 0 22 00000000000000000000001111111111
215 11 0 21 00000000000000000000011111111111
216 12 0 20 00000000000000000000111111111111
217 13 0 19 00000000000000000001111111111111
218 14 0 18 00000000000000000011111111111111
219 15 0 17 00000000000000000111111111111111
220 16 0 16 00000000000000001111111111111111
221 17 0 15 00000000000000011111111111111111
222 18 0 14 00000000000000111111111111111111
223 19 0 13 00000000000001111111111111111111
224 20 0 12 00000000000011111111111111111111
225 21 0 11 00000000000111111111111111111111
226 22 0 10 00000000001111111111111111111111
227 23 0 9 00000000011111111111111111111111
228 24 0 8 00000000111111111111111111111111
229 25 0 7 00000001111111111111111111111111
230 26 0 6 00000011111111111111111111111111
231 27 0 5 00000111111111111111111111111111
232 28 0 4 00001111111111111111111111111111
233 29 0 3 00011111111111111111111111111111
234 30 0 2 00111111111111111111111111111111
235 31 0 1 01111111111111111111111111111111
237 0 bit should move right 1 position each line
238 0 0 1 01111111111111111111111111111111
239 1 1 0 10111111111111111111111111111111
240 2 2 0 11011111111111111111111111111111
241 3 3 0 11101111111111111111111111111111
242 4 4 0 11110111111111111111111111111111
243 5 5 0 11111011111111111111111111111111
244 6 6 0 11111101111111111111111111111111
245 7 7 0 11111110111111111111111111111111
246 8 8 0 11111111011111111111111111111111
247 9 9 0 11111111101111111111111111111111
248 10 10 0 11111111110111111111111111111111
249 11 11 0 11111111111011111111111111111111
250 12 12 0 11111111111101111111111111111111
251 13 13 0 11111111111110111111111111111111
252 14 14 0 11111111111111011111111111111111
253 15 15 0 11111111111111101111111111111111
254 16 16 0 11111111111111110111111111111111
255 17 17 0 11111111111111111011111111111111
256 18 18 0 11111111111111111101111111111111
257 19 19 0 11111111111111111110111111111111
258 20 20 0 11111111111111111111011111111111
259 21 21 0 11111111111111111111101111111111
260 22 22 0 11111111111111111111110111111111
261 23 23 0 11111111111111111111111011111111
262 24 24 0 11111111111111111111111101111111
263 25 25 0 11111111111111111111111110111111
264 26 26 0 11111111111111111111111111011111
265 27 27 0 11111111111111111111111111101111
266 28 28 0 11111111111111111111111111110111
267 29 29 0 11111111111111111111111111111011
268 30 30 0 11111111111111111111111111111101
269 31 31 0 11111111111111111111111111111110
271 1 bit should move right 1 position each line
272 0 1 0 10000000000000000000000000000000
273 1 0 1 01000000000000000000000000000000
274 2 0 2 00100000000000000000000000000000
275 3 0 3 00010000000000000000000000000000
276 4 0 4 00001000000000000000000000000000
277 5 0 5 00000100000000000000000000000000
278 6 0 6 00000010000000000000000000000000
279 7 0 7 00000001000000000000000000000000
280 8 0 8 00000000100000000000000000000000
281 9 0 9 00000000010000000000000000000000
282 10 0 10 00000000001000000000000000000000
283 11 0 11 00000000000100000000000000000000
284 12 0 12 00000000000010000000000000000000
285 13 0 13 00000000000001000000000000000000
286 14 0 14 00000000000000100000000000000000
287 15 0 15 00000000000000010000000000000000
288 16 0 16 00000000000000001000000000000000
289 17 0 17 00000000000000000100000000000000
290 18 0 18 00000000000000000010000000000000
291 19 0 19 00000000000000000001000000000000
292 20 0 20 00000000000000000000100000000000
293 21 0 21 00000000000000000000010000000000
294 22 0 22 00000000000000000000001000000000
295 23 0 23 00000000000000000000000100000000
296 24 0 24 00000000000000000000000010000000
297 25 0 25 00000000000000000000000001000000
298 26 0 26 00000000000000000000000000100000
299 27 0 27 00000000000000000000000000010000
300 28 0 28 00000000000000000000000000001000
301 29 0 29 00000000000000000000000000000100
302 30 0 30 00000000000000000000000000000010
303 31 0 31 00000000000000000000000000000001