Lines Matching refs:CHECK
30 #define CHECK(x) \ macro
36 CHECK( ! VG_STREQ(NULL, NULL) ); // Nb: strcmp() considers these equal in test_VG_STREQ()
37 CHECK( ! VG_STREQ(NULL, "ab") ); // Nb: strcmp() seg faults on this in test_VG_STREQ()
38 CHECK( ! VG_STREQ("ab", NULL) ); // Nb: strcmp() seg faults on this in test_VG_STREQ()
39 CHECK( ! VG_STREQ("", "a") ); in test_VG_STREQ()
40 CHECK( ! VG_STREQ("a", "") ); in test_VG_STREQ()
41 CHECK( ! VG_STREQ("abc", "abcd")); in test_VG_STREQ()
42 CHECK( ! VG_STREQ("abcd", "abc") ); in test_VG_STREQ()
43 CHECK( ! VG_STREQ("Abcd", "abcd")); in test_VG_STREQ()
44 CHECK( ! VG_STREQ("abcd", "Abcd")); in test_VG_STREQ()
46 CHECK( VG_STREQ("", "") ); in test_VG_STREQ()
47 CHECK( VG_STREQ("a", "a") ); in test_VG_STREQ()
48 CHECK( VG_STREQ("abcd", "abcd") ); in test_VG_STREQ()
53 CHECK( ! VG_STREQN(0, NULL, NULL) ); in test_VG_STREQN()
54 CHECK( ! VG_STREQN(5, NULL, NULL) ); in test_VG_STREQN()
55 CHECK( ! VG_STREQN(0, NULL, "ab") ); in test_VG_STREQN()
56 CHECK( ! VG_STREQN(5, NULL, "ab") ); in test_VG_STREQN()
57 CHECK( ! VG_STREQN(0, "ab", NULL) ); in test_VG_STREQN()
58 CHECK( ! VG_STREQN(1, "", "a") ); in test_VG_STREQN()
59 CHECK( ! VG_STREQN(1, "a", "") ); in test_VG_STREQN()
60 CHECK( ! VG_STREQN(4, "abc", "abcd")); in test_VG_STREQN()
61 CHECK( ! VG_STREQN(4, "abcd", "abc") ); in test_VG_STREQN()
62 CHECK( ! VG_STREQN(1, "Abcd", "abcd")); in test_VG_STREQN()
63 CHECK( ! VG_STREQN(4, "Abcd", "abcd")); in test_VG_STREQN()
64 CHECK( ! VG_STREQN(4, "abcd", "abce")); in test_VG_STREQN()
65 CHECK( ! VG_STREQN(9, "abcd", "abce")); in test_VG_STREQN()
67 CHECK( VG_STREQN(0, "", "") ); in test_VG_STREQN()
68 CHECK( VG_STREQN(1, "", "") ); in test_VG_STREQN()
69 CHECK( VG_STREQN(0, "a", "a") ); in test_VG_STREQN()
70 CHECK( VG_STREQN(1, "a", "a") ); in test_VG_STREQN()
71 CHECK( VG_STREQN(2, "a", "a") ); in test_VG_STREQN()
72 CHECK( VG_STREQN(9, "a", "a") ); in test_VG_STREQN()
73 CHECK( VG_STREQN(1, "ab", "ac")); in test_VG_STREQN()
74 CHECK( VG_STREQN(3, "abcd", "abce")); in test_VG_STREQN()
87 CHECK( VG_IS_2_ALIGNED(0x0) ); in test_VG_IS_XYZ_ALIGNED()
88 CHECK( ! VG_IS_2_ALIGNED(0x1) ); in test_VG_IS_XYZ_ALIGNED()
89 CHECK( VG_IS_2_ALIGNED(0x2) ); in test_VG_IS_XYZ_ALIGNED()
90 CHECK( ! VG_IS_2_ALIGNED(0x3) ); in test_VG_IS_XYZ_ALIGNED()
91 CHECK( VG_IS_2_ALIGNED(0x4) ); in test_VG_IS_XYZ_ALIGNED()
92 CHECK( ! VG_IS_2_ALIGNED(0x5) ); in test_VG_IS_XYZ_ALIGNED()
93 CHECK( VG_IS_2_ALIGNED(0x6) ); in test_VG_IS_XYZ_ALIGNED()
94 CHECK( ! VG_IS_2_ALIGNED(0x7) ); in test_VG_IS_XYZ_ALIGNED()
95 CHECK( VG_IS_2_ALIGNED(0x8) ); in test_VG_IS_XYZ_ALIGNED()
96 CHECK( ! VG_IS_2_ALIGNED(0x9) ); in test_VG_IS_XYZ_ALIGNED()
97 CHECK( VG_IS_2_ALIGNED(0xa) ); in test_VG_IS_XYZ_ALIGNED()
98 CHECK( ! VG_IS_2_ALIGNED(0xb) ); in test_VG_IS_XYZ_ALIGNED()
99 CHECK( VG_IS_2_ALIGNED(0xc) ); in test_VG_IS_XYZ_ALIGNED()
100 CHECK( ! VG_IS_2_ALIGNED(0xd) ); in test_VG_IS_XYZ_ALIGNED()
101 CHECK( VG_IS_2_ALIGNED(0xe) ); in test_VG_IS_XYZ_ALIGNED()
102 CHECK( ! VG_IS_2_ALIGNED(0xf) ); in test_VG_IS_XYZ_ALIGNED()
104 CHECK( VG_IS_4_ALIGNED(0x0) ); in test_VG_IS_XYZ_ALIGNED()
105 CHECK( ! VG_IS_4_ALIGNED(0x1) ); in test_VG_IS_XYZ_ALIGNED()
106 CHECK( ! VG_IS_4_ALIGNED(0x2) ); in test_VG_IS_XYZ_ALIGNED()
107 CHECK( ! VG_IS_4_ALIGNED(0x3) ); in test_VG_IS_XYZ_ALIGNED()
108 CHECK( VG_IS_4_ALIGNED(0x4) ); in test_VG_IS_XYZ_ALIGNED()
109 CHECK( ! VG_IS_4_ALIGNED(0x5) ); in test_VG_IS_XYZ_ALIGNED()
110 CHECK( ! VG_IS_4_ALIGNED(0x6) ); in test_VG_IS_XYZ_ALIGNED()
111 CHECK( ! VG_IS_4_ALIGNED(0x7) ); in test_VG_IS_XYZ_ALIGNED()
112 CHECK( VG_IS_4_ALIGNED(0x8) ); in test_VG_IS_XYZ_ALIGNED()
113 CHECK( ! VG_IS_4_ALIGNED(0x9) ); in test_VG_IS_XYZ_ALIGNED()
114 CHECK( ! VG_IS_4_ALIGNED(0xa) ); in test_VG_IS_XYZ_ALIGNED()
115 CHECK( ! VG_IS_4_ALIGNED(0xb) ); in test_VG_IS_XYZ_ALIGNED()
116 CHECK( VG_IS_4_ALIGNED(0xc) ); in test_VG_IS_XYZ_ALIGNED()
117 CHECK( ! VG_IS_4_ALIGNED(0xd) ); in test_VG_IS_XYZ_ALIGNED()
118 CHECK( ! VG_IS_4_ALIGNED(0xe) ); in test_VG_IS_XYZ_ALIGNED()
119 CHECK( ! VG_IS_4_ALIGNED(0xf) ); in test_VG_IS_XYZ_ALIGNED()
121 CHECK( VG_IS_8_ALIGNED(0x0) ); in test_VG_IS_XYZ_ALIGNED()
122 CHECK( ! VG_IS_8_ALIGNED(0x1) ); in test_VG_IS_XYZ_ALIGNED()
123 CHECK( ! VG_IS_8_ALIGNED(0x2) ); in test_VG_IS_XYZ_ALIGNED()
124 CHECK( ! VG_IS_8_ALIGNED(0x3) ); in test_VG_IS_XYZ_ALIGNED()
125 CHECK( ! VG_IS_8_ALIGNED(0x4) ); in test_VG_IS_XYZ_ALIGNED()
126 CHECK( ! VG_IS_8_ALIGNED(0x5) ); in test_VG_IS_XYZ_ALIGNED()
127 CHECK( ! VG_IS_8_ALIGNED(0x6) ); in test_VG_IS_XYZ_ALIGNED()
128 CHECK( ! VG_IS_8_ALIGNED(0x7) ); in test_VG_IS_XYZ_ALIGNED()
129 CHECK( VG_IS_8_ALIGNED(0x8) ); in test_VG_IS_XYZ_ALIGNED()
130 CHECK( ! VG_IS_8_ALIGNED(0x9) ); in test_VG_IS_XYZ_ALIGNED()
131 CHECK( ! VG_IS_8_ALIGNED(0xa) ); in test_VG_IS_XYZ_ALIGNED()
132 CHECK( ! VG_IS_8_ALIGNED(0xb) ); in test_VG_IS_XYZ_ALIGNED()
133 CHECK( ! VG_IS_8_ALIGNED(0xc) ); in test_VG_IS_XYZ_ALIGNED()
134 CHECK( ! VG_IS_8_ALIGNED(0xd) ); in test_VG_IS_XYZ_ALIGNED()
135 CHECK( ! VG_IS_8_ALIGNED(0xe) ); in test_VG_IS_XYZ_ALIGNED()
136 CHECK( ! VG_IS_8_ALIGNED(0xf) ); in test_VG_IS_XYZ_ALIGNED()
138 CHECK( VG_IS_16_ALIGNED(0x0) ); in test_VG_IS_XYZ_ALIGNED()
139 CHECK( ! VG_IS_16_ALIGNED(0x1) ); in test_VG_IS_XYZ_ALIGNED()
140 CHECK( ! VG_IS_16_ALIGNED(0x2) ); in test_VG_IS_XYZ_ALIGNED()
141 CHECK( ! VG_IS_16_ALIGNED(0x3) ); in test_VG_IS_XYZ_ALIGNED()
142 CHECK( ! VG_IS_16_ALIGNED(0x4) ); in test_VG_IS_XYZ_ALIGNED()
143 CHECK( ! VG_IS_16_ALIGNED(0x5) ); in test_VG_IS_XYZ_ALIGNED()
144 CHECK( ! VG_IS_16_ALIGNED(0x6) ); in test_VG_IS_XYZ_ALIGNED()
145 CHECK( ! VG_IS_16_ALIGNED(0x7) ); in test_VG_IS_XYZ_ALIGNED()
146 CHECK( ! VG_IS_16_ALIGNED(0x8) ); in test_VG_IS_XYZ_ALIGNED()
147 CHECK( ! VG_IS_16_ALIGNED(0x9) ); in test_VG_IS_XYZ_ALIGNED()
148 CHECK( ! VG_IS_16_ALIGNED(0xa) ); in test_VG_IS_XYZ_ALIGNED()
149 CHECK( ! VG_IS_16_ALIGNED(0xb) ); in test_VG_IS_XYZ_ALIGNED()
150 CHECK( ! VG_IS_16_ALIGNED(0xc) ); in test_VG_IS_XYZ_ALIGNED()
151 CHECK( ! VG_IS_16_ALIGNED(0xd) ); in test_VG_IS_XYZ_ALIGNED()
152 CHECK( ! VG_IS_16_ALIGNED(0xe) ); in test_VG_IS_XYZ_ALIGNED()
153 CHECK( ! VG_IS_16_ALIGNED(0xf) ); in test_VG_IS_XYZ_ALIGNED()
155 CHECK( VG_IS_WORD_ALIGNED(0x0) ); in test_VG_IS_XYZ_ALIGNED()
156 CHECK( ! VG_IS_WORD_ALIGNED(0x1) ); in test_VG_IS_XYZ_ALIGNED()
157 CHECK( ! VG_IS_WORD_ALIGNED(0x2) ); in test_VG_IS_XYZ_ALIGNED()
158 CHECK( ! VG_IS_WORD_ALIGNED(0x3) ); in test_VG_IS_XYZ_ALIGNED()
160 CHECK( ! VG_IS_WORD_ALIGNED(0x5) ); in test_VG_IS_XYZ_ALIGNED()
161 CHECK( ! VG_IS_WORD_ALIGNED(0x6) ); in test_VG_IS_XYZ_ALIGNED()
162 CHECK( ! VG_IS_WORD_ALIGNED(0x7) ); in test_VG_IS_XYZ_ALIGNED()
163 CHECK( VG_IS_WORD_ALIGNED(0x8) ); in test_VG_IS_XYZ_ALIGNED()
164 CHECK( ! VG_IS_WORD_ALIGNED(0x9) ); in test_VG_IS_XYZ_ALIGNED()
165 CHECK( ! VG_IS_WORD_ALIGNED(0xa) ); in test_VG_IS_XYZ_ALIGNED()
166 CHECK( ! VG_IS_WORD_ALIGNED(0xb) ); in test_VG_IS_XYZ_ALIGNED()
168 CHECK( ! VG_IS_WORD_ALIGNED(0xd) ); in test_VG_IS_XYZ_ALIGNED()
169 CHECK( ! VG_IS_WORD_ALIGNED(0xe) ); in test_VG_IS_XYZ_ALIGNED()
170 CHECK( ! VG_IS_WORD_ALIGNED(0xf) ); in test_VG_IS_XYZ_ALIGNED()
172 CHECK( VG_IS_WORD_ALIGNED(0x4) ); in test_VG_IS_XYZ_ALIGNED()
173 CHECK( VG_IS_WORD_ALIGNED(0xc) ); in test_VG_IS_XYZ_ALIGNED()
175 CHECK( ! VG_IS_WORD_ALIGNED(0x4) ); in test_VG_IS_XYZ_ALIGNED()
176 CHECK( ! VG_IS_WORD_ALIGNED(0xc) ); in test_VG_IS_XYZ_ALIGNED()
181 CHECK( VG_IS_PAGE_ALIGNED(0x0) ); in test_VG_IS_XYZ_ALIGNED()
182 CHECK( ! VG_IS_PAGE_ALIGNED(0x1) ); in test_VG_IS_XYZ_ALIGNED()
183 CHECK( ! VG_IS_PAGE_ALIGNED(0x2) ); in test_VG_IS_XYZ_ALIGNED()
184 CHECK( ! VG_IS_PAGE_ALIGNED(0x3) ); in test_VG_IS_XYZ_ALIGNED()
185 CHECK( ! VG_IS_PAGE_ALIGNED(0x4) ); in test_VG_IS_XYZ_ALIGNED()
186 CHECK( ! VG_IS_PAGE_ALIGNED(VKI_PAGE_SIZE-1) ); in test_VG_IS_XYZ_ALIGNED()
187 CHECK( VG_IS_PAGE_ALIGNED(VKI_PAGE_SIZE ) ); in test_VG_IS_XYZ_ALIGNED()
188 CHECK( ! VG_IS_PAGE_ALIGNED(VKI_PAGE_SIZE+1) ); in test_VG_IS_XYZ_ALIGNED()
193 CHECK( 0 == VG_ROUNDDN(0, 1) ); in test_VG_ROUND_et_al()
194 CHECK( 1 == VG_ROUNDDN(1, 1) ); in test_VG_ROUND_et_al()
195 CHECK( 2 == VG_ROUNDDN(2, 1) ); in test_VG_ROUND_et_al()
196 CHECK( 3 == VG_ROUNDDN(3, 1) ); in test_VG_ROUND_et_al()
197 CHECK( 4 == VG_ROUNDDN(4, 1) ); in test_VG_ROUND_et_al()
198 CHECK( 5 == VG_ROUNDDN(5, 1) ); in test_VG_ROUND_et_al()
199 CHECK( 6 == VG_ROUNDDN(6, 1) ); in test_VG_ROUND_et_al()
200 CHECK( 7 == VG_ROUNDDN(7, 1) ); in test_VG_ROUND_et_al()
202 CHECK( 0 == VG_ROUNDUP(0, 1) ); in test_VG_ROUND_et_al()
203 CHECK( 1 == VG_ROUNDUP(1, 1) ); in test_VG_ROUND_et_al()
204 CHECK( 2 == VG_ROUNDUP(2, 1) ); in test_VG_ROUND_et_al()
205 CHECK( 3 == VG_ROUNDUP(3, 1) ); in test_VG_ROUND_et_al()
206 CHECK( 4 == VG_ROUNDUP(4, 1) ); in test_VG_ROUND_et_al()
207 CHECK( 5 == VG_ROUNDUP(5, 1) ); in test_VG_ROUND_et_al()
208 CHECK( 6 == VG_ROUNDUP(6, 1) ); in test_VG_ROUND_et_al()
209 CHECK( 7 == VG_ROUNDUP(7, 1) ); in test_VG_ROUND_et_al()
211 CHECK( 0 == VG_ROUNDDN(0, 2) ); in test_VG_ROUND_et_al()
212 CHECK( 0 == VG_ROUNDDN(1, 2) ); in test_VG_ROUND_et_al()
213 CHECK( 2 == VG_ROUNDDN(2, 2) ); in test_VG_ROUND_et_al()
214 CHECK( 2 == VG_ROUNDDN(3, 2) ); in test_VG_ROUND_et_al()
215 CHECK( 4 == VG_ROUNDDN(4, 2) ); in test_VG_ROUND_et_al()
216 CHECK( 4 == VG_ROUNDDN(5, 2) ); in test_VG_ROUND_et_al()
217 CHECK( 6 == VG_ROUNDDN(6, 2) ); in test_VG_ROUND_et_al()
218 CHECK( 6 == VG_ROUNDDN(7, 2) ); in test_VG_ROUND_et_al()
220 CHECK( 0 == VG_ROUNDUP(0, 2) ); in test_VG_ROUND_et_al()
221 CHECK( 2 == VG_ROUNDUP(1, 2) ); in test_VG_ROUND_et_al()
222 CHECK( 2 == VG_ROUNDUP(2, 2) ); in test_VG_ROUND_et_al()
223 CHECK( 4 == VG_ROUNDUP(3, 2) ); in test_VG_ROUND_et_al()
224 CHECK( 4 == VG_ROUNDUP(4, 2) ); in test_VG_ROUND_et_al()
225 CHECK( 6 == VG_ROUNDUP(5, 2) ); in test_VG_ROUND_et_al()
226 CHECK( 6 == VG_ROUNDUP(6, 2) ); in test_VG_ROUND_et_al()
227 CHECK( 8 == VG_ROUNDUP(7, 2) ); in test_VG_ROUND_et_al()
229 CHECK( 0 == VG_ROUNDDN(0, 4) ); in test_VG_ROUND_et_al()
230 CHECK( 0 == VG_ROUNDDN(1, 4) ); in test_VG_ROUND_et_al()
231 CHECK( 0 == VG_ROUNDDN(2, 4) ); in test_VG_ROUND_et_al()
232 CHECK( 0 == VG_ROUNDDN(3, 4) ); in test_VG_ROUND_et_al()
233 CHECK( 4 == VG_ROUNDDN(4, 4) ); in test_VG_ROUND_et_al()
234 CHECK( 4 == VG_ROUNDDN(5, 4) ); in test_VG_ROUND_et_al()
235 CHECK( 4 == VG_ROUNDDN(6, 4) ); in test_VG_ROUND_et_al()
236 CHECK( 4 == VG_ROUNDDN(7, 4) ); in test_VG_ROUND_et_al()
238 CHECK( 0 == VG_ROUNDUP(0, 4) ); in test_VG_ROUND_et_al()
239 CHECK( 4 == VG_ROUNDUP(1, 4) ); in test_VG_ROUND_et_al()
240 CHECK( 4 == VG_ROUNDUP(2, 4) ); in test_VG_ROUND_et_al()
241 CHECK( 4 == VG_ROUNDUP(3, 4) ); in test_VG_ROUND_et_al()
242 CHECK( 4 == VG_ROUNDUP(4, 4) ); in test_VG_ROUND_et_al()
243 CHECK( 8 == VG_ROUNDUP(5, 4) ); in test_VG_ROUND_et_al()
244 CHECK( 8 == VG_ROUNDUP(6, 4) ); in test_VG_ROUND_et_al()
245 CHECK( 8 == VG_ROUNDUP(7, 4) ); in test_VG_ROUND_et_al()
247 CHECK( 0 == VG_ROUNDDN(0, 8) ); in test_VG_ROUND_et_al()
248 CHECK( 0 == VG_ROUNDDN(1, 8) ); in test_VG_ROUND_et_al()
249 CHECK( 0 == VG_ROUNDDN(2, 8) ); in test_VG_ROUND_et_al()
250 CHECK( 0 == VG_ROUNDDN(3, 8) ); in test_VG_ROUND_et_al()
251 CHECK( 0 == VG_ROUNDDN(4, 8) ); in test_VG_ROUND_et_al()
252 CHECK( 0 == VG_ROUNDDN(5, 8) ); in test_VG_ROUND_et_al()
253 CHECK( 0 == VG_ROUNDDN(6, 8) ); in test_VG_ROUND_et_al()
254 CHECK( 0 == VG_ROUNDDN(7, 8) ); in test_VG_ROUND_et_al()
256 CHECK( 0 == VG_ROUNDUP(0, 8) ); in test_VG_ROUND_et_al()
257 CHECK( 8 == VG_ROUNDUP(1, 8) ); in test_VG_ROUND_et_al()
258 CHECK( 8 == VG_ROUNDUP(2, 8) ); in test_VG_ROUND_et_al()
259 CHECK( 8 == VG_ROUNDUP(3, 8) ); in test_VG_ROUND_et_al()
260 CHECK( 8 == VG_ROUNDUP(4, 8) ); in test_VG_ROUND_et_al()
261 CHECK( 8 == VG_ROUNDUP(5, 8) ); in test_VG_ROUND_et_al()
262 CHECK( 8 == VG_ROUNDUP(6, 8) ); in test_VG_ROUND_et_al()
263 CHECK( 8 == VG_ROUNDUP(7, 8) ); in test_VG_ROUND_et_al()
265 CHECK( 0 == VG_PGROUNDDN(0) ); in test_VG_ROUND_et_al()
266 CHECK( 0 == VG_PGROUNDDN(1) ); in test_VG_ROUND_et_al()
267 CHECK( 0 == VG_PGROUNDDN(2) ); in test_VG_ROUND_et_al()
268 CHECK( 0 == VG_PGROUNDDN(3) ); in test_VG_ROUND_et_al()
269 CHECK( 0 == VG_PGROUNDDN(4) ); in test_VG_ROUND_et_al()
270 CHECK( 0 == VG_PGROUNDDN(VKI_PAGE_SIZE-1) ); in test_VG_ROUND_et_al()
271 CHECK( VKI_PAGE_SIZE == VG_PGROUNDDN(VKI_PAGE_SIZE ) ); in test_VG_ROUND_et_al()
272 CHECK( VKI_PAGE_SIZE == VG_PGROUNDDN(VKI_PAGE_SIZE+1) ); in test_VG_ROUND_et_al()
274 CHECK( 0 == VG_PGROUNDUP(0) ); in test_VG_ROUND_et_al()
275 CHECK( VKI_PAGE_SIZE == VG_PGROUNDUP(1) ); in test_VG_ROUND_et_al()
276 CHECK( VKI_PAGE_SIZE == VG_PGROUNDUP(2) ); in test_VG_ROUND_et_al()
277 CHECK( VKI_PAGE_SIZE == VG_PGROUNDUP(3) ); in test_VG_ROUND_et_al()
278 CHECK( VKI_PAGE_SIZE == VG_PGROUNDUP(4) ); in test_VG_ROUND_et_al()
279 CHECK( VKI_PAGE_SIZE == VG_PGROUNDUP(VKI_PAGE_SIZE-1) ); in test_VG_ROUND_et_al()
280 CHECK( VKI_PAGE_SIZE == VG_PGROUNDUP(VKI_PAGE_SIZE ) ); in test_VG_ROUND_et_al()
281 CHECK( VKI_PAGE_SIZE*2 == VG_PGROUNDUP(VKI_PAGE_SIZE+1) ); in test_VG_ROUND_et_al()
286 CHECK( VG_(isspace)(' ') ); in test_isspace()
287 CHECK( VG_(isspace)('\n') ); in test_isspace()
288 CHECK( VG_(isspace)('\t') ); in test_isspace()
289 CHECK( ! VG_(isspace)('3') ); in test_isspace()
290 CHECK( ! VG_(isspace)('x') ); in test_isspace()
295 CHECK( VG_(isdigit)('0') ); in test_isdigit()
296 CHECK( VG_(isdigit)('1') ); in test_isdigit()
297 CHECK( VG_(isdigit)('5') ); in test_isdigit()
298 CHECK( VG_(isdigit)('9') ); in test_isdigit()
299 CHECK( ! VG_(isdigit)('a') ); in test_isdigit()
300 CHECK( ! VG_(isdigit)('!') ); in test_isdigit()
306 CHECK( is_dec_digit('0', &x) && 0 == x ); in test_is_dec_digit()
307 CHECK( is_dec_digit('1', &x) && 1 == x ); in test_is_dec_digit()
308 CHECK( is_dec_digit('9', &x) && 9 == x ); in test_is_dec_digit()
314 CHECK( is_hex_digit('0', &x) && 0 == x ); in test_is_hex_digit()
315 CHECK( is_hex_digit('1', &x) && 1 == x ); in test_is_hex_digit()
316 CHECK( is_hex_digit('9', &x) && 9 == x ); in test_is_hex_digit()
317 CHECK( is_hex_digit('a', &x) && 10 == x ); in test_is_hex_digit()
318 CHECK( is_hex_digit('f', &x) && 15 == x ); in test_is_hex_digit()
319 CHECK( is_hex_digit('A', &x) && 10 == x ); in test_is_hex_digit()
320 CHECK( is_hex_digit('F', &x) && 15 == x ); in test_is_hex_digit()
373 CHECK(a[i].res == res1 && a[i].endptr_val == *endptr1); in test_strtoll_and_strtod()
374 CHECK(res2 == res1 && *endptr2 == *endptr1); in test_strtoll_and_strtod()
428 CHECK(a[i].res == res1 && a[i].endptr_val == *endptr1); in test_strtoll_and_strtod()
429 CHECK(res2 == res1 && *endptr2 == *endptr1); in test_strtoll_and_strtod()
439 CHECK( -1 == VG_(log2)(0) ); in test_log2()
440 CHECK( 0 == VG_(log2)(1) ); in test_log2()
441 CHECK( 1 == VG_(log2)(2) ); in test_log2()
442 CHECK( -1 == VG_(log2)(3) ); in test_log2()
443 CHECK( 2 == VG_(log2)(4) ); in test_log2()
444 CHECK( -1 == VG_(log2)(5) ); in test_log2()
445 CHECK( -1 == VG_(log2)(6) ); in test_log2()
446 CHECK( -1 == VG_(log2)(7) ); in test_log2()
447 CHECK( 3 == VG_(log2)(8) ); in test_log2()
449 CHECK( -1 == VG_(log2)( 15) ); in test_log2()
450 CHECK( 4 == VG_(log2)( 16) ); in test_log2()
451 CHECK( -1 == VG_(log2)( 17) ); in test_log2()
453 CHECK( -1 == VG_(log2)( 63) ); in test_log2()
454 CHECK( 6 == VG_(log2)( 64) ); in test_log2()
455 CHECK( -1 == VG_(log2)( 65) ); in test_log2()
457 CHECK( -1 == VG_(log2)(255) ); in test_log2()
458 CHECK( 8 == VG_(log2)(256) ); in test_log2()
459 CHECK( -1 == VG_(log2)(257) ); in test_log2()
461 CHECK( -1 == VG_(log2)(65535) ); in test_log2()
462 CHECK( 16 == VG_(log2)(65536) ); in test_log2()
463 CHECK( -1 == VG_(log2)(65537) ); in test_log2()
465 CHECK( -1 == VG_(log2)(16777215) ); in test_log2()
466 CHECK( 24 == VG_(log2)(16777216) ); in test_log2()
467 CHECK( -1 == VG_(log2)(16777217) ); in test_log2()
469 CHECK( -1 == VG_(log2)(2147483647U) ); in test_log2()
470 CHECK( 31 == VG_(log2)(2147483648U) ); in test_log2()
471 CHECK( -1 == VG_(log2)(2147483649U) ); in test_log2()
473 CHECK( -1 == VG_(log2)(4294967295U) ); // Max UInt in test_log2()