Lines Matching refs:TEST
167 #define TEST(expected_str_untruncated, ...) do { \ in TEST_BEGIN() macro
177 TEST("012346789", "012346789"); in TEST_BEGIN()
178 TEST("a0123b", "a%sb", "0123"); in TEST_BEGIN()
179 TEST("a01234567", "a%s%s", "0123", "4567"); in TEST_BEGIN()
180 TEST("a0123 ", "a%-6s", "0123"); in TEST_BEGIN()
181 TEST("a 0123", "a%6s", "0123"); in TEST_BEGIN()
182 TEST("a 012", "a%6.3s", "0123"); in TEST_BEGIN()
183 TEST("a 012", "a%*.*s", 6, 3, "0123"); in TEST_BEGIN()
184 TEST("a 123b", "a% db", 123); in TEST_BEGIN()
185 TEST("a123b", "a%-db", 123); in TEST_BEGIN()
186 TEST("a-123b", "a%-db", -123); in TEST_BEGIN()
187 TEST("a+123b", "a%+db", 123); in TEST_BEGIN()
190 #undef TEST in TEST_BEGIN()
199 #define TEST(expected_str, ...) do { \ in TEST_BEGIN() macro
205 TEST("hello", "hello"); in TEST_BEGIN()
207 TEST("50%, 100%", "50%%, %d%%", 100); in TEST_BEGIN()
209 TEST("a0123b", "a%sb", "0123"); in TEST_BEGIN()
211 TEST("a 0123b", "a%5sb", "0123"); in TEST_BEGIN()
212 TEST("a 0123b", "a%*sb", 5, "0123"); in TEST_BEGIN()
214 TEST("a0123 b", "a%-5sb", "0123"); in TEST_BEGIN()
215 TEST("a0123b", "a%*sb", -1, "0123"); in TEST_BEGIN()
216 TEST("a0123 b", "a%*sb", -5, "0123"); in TEST_BEGIN()
217 TEST("a0123 b", "a%-*sb", -5, "0123"); in TEST_BEGIN()
219 TEST("a012b", "a%.3sb", "0123"); in TEST_BEGIN()
220 TEST("a012b", "a%.*sb", 3, "0123"); in TEST_BEGIN()
221 TEST("a0123b", "a%.*sb", -3, "0123"); in TEST_BEGIN()
223 TEST("a 012b", "a%5.3sb", "0123"); in TEST_BEGIN()
224 TEST("a 012b", "a%5.*sb", 3, "0123"); in TEST_BEGIN()
225 TEST("a 012b", "a%*.3sb", 5, "0123"); in TEST_BEGIN()
226 TEST("a 012b", "a%*.*sb", 5, 3, "0123"); in TEST_BEGIN()
227 TEST("a 0123b", "a%*.*sb", 5, -3, "0123"); in TEST_BEGIN()
229 TEST("_abcd_", "_%x_", 0xabcd); in TEST_BEGIN()
230 TEST("_0xabcd_", "_%#x_", 0xabcd); in TEST_BEGIN()
231 TEST("_1234_", "_%o_", 01234); in TEST_BEGIN()
232 TEST("_01234_", "_%#o_", 01234); in TEST_BEGIN()
233 TEST("_1234_", "_%u_", 1234); in TEST_BEGIN()
235 TEST("_1234_", "_%d_", 1234); in TEST_BEGIN()
236 TEST("_ 1234_", "_% d_", 1234); in TEST_BEGIN()
237 TEST("_+1234_", "_%+d_", 1234); in TEST_BEGIN()
238 TEST("_-1234_", "_%d_", -1234); in TEST_BEGIN()
239 TEST("_-1234_", "_% d_", -1234); in TEST_BEGIN()
240 TEST("_-1234_", "_%+d_", -1234); in TEST_BEGIN()
242 TEST("_-1234_", "_%d_", -1234); in TEST_BEGIN()
243 TEST("_1234_", "_%d_", 1234); in TEST_BEGIN()
244 TEST("_-1234_", "_%i_", -1234); in TEST_BEGIN()
245 TEST("_1234_", "_%i_", 1234); in TEST_BEGIN()
246 TEST("_01234_", "_%#o_", 01234); in TEST_BEGIN()
247 TEST("_1234_", "_%u_", 1234); in TEST_BEGIN()
248 TEST("_0x1234abc_", "_%#x_", 0x1234abc); in TEST_BEGIN()
249 TEST("_0X1234ABC_", "_%#X_", 0x1234abc); in TEST_BEGIN()
250 TEST("_c_", "_%c_", 'c'); in TEST_BEGIN()
251 TEST("_string_", "_%s_", "string"); in TEST_BEGIN()
252 TEST("_0x42_", "_%p_", ((void *)0x42)); in TEST_BEGIN()
254 TEST("_-1234_", "_%ld_", ((long)-1234)); in TEST_BEGIN()
255 TEST("_1234_", "_%ld_", ((long)1234)); in TEST_BEGIN()
256 TEST("_-1234_", "_%li_", ((long)-1234)); in TEST_BEGIN()
257 TEST("_1234_", "_%li_", ((long)1234)); in TEST_BEGIN()
258 TEST("_01234_", "_%#lo_", ((long)01234)); in TEST_BEGIN()
259 TEST("_1234_", "_%lu_", ((long)1234)); in TEST_BEGIN()
260 TEST("_0x1234abc_", "_%#lx_", ((long)0x1234abc)); in TEST_BEGIN()
261 TEST("_0X1234ABC_", "_%#lX_", ((long)0x1234ABC)); in TEST_BEGIN()
263 TEST("_-1234_", "_%lld_", ((long long)-1234)); in TEST_BEGIN()
264 TEST("_1234_", "_%lld_", ((long long)1234)); in TEST_BEGIN()
265 TEST("_-1234_", "_%lli_", ((long long)-1234)); in TEST_BEGIN()
266 TEST("_1234_", "_%lli_", ((long long)1234)); in TEST_BEGIN()
267 TEST("_01234_", "_%#llo_", ((long long)01234)); in TEST_BEGIN()
268 TEST("_1234_", "_%llu_", ((long long)1234)); in TEST_BEGIN()
269 TEST("_0x1234abc_", "_%#llx_", ((long long)0x1234abc)); in TEST_BEGIN()
270 TEST("_0X1234ABC_", "_%#llX_", ((long long)0x1234ABC)); in TEST_BEGIN()
272 TEST("_-1234_", "_%qd_", ((long long)-1234)); in TEST_BEGIN()
273 TEST("_1234_", "_%qd_", ((long long)1234)); in TEST_BEGIN()
274 TEST("_-1234_", "_%qi_", ((long long)-1234)); in TEST_BEGIN()
275 TEST("_1234_", "_%qi_", ((long long)1234)); in TEST_BEGIN()
276 TEST("_01234_", "_%#qo_", ((long long)01234)); in TEST_BEGIN()
277 TEST("_1234_", "_%qu_", ((long long)1234)); in TEST_BEGIN()
278 TEST("_0x1234abc_", "_%#qx_", ((long long)0x1234abc)); in TEST_BEGIN()
279 TEST("_0X1234ABC_", "_%#qX_", ((long long)0x1234ABC)); in TEST_BEGIN()
281 TEST("_-1234_", "_%jd_", ((intmax_t)-1234)); in TEST_BEGIN()
282 TEST("_1234_", "_%jd_", ((intmax_t)1234)); in TEST_BEGIN()
283 TEST("_-1234_", "_%ji_", ((intmax_t)-1234)); in TEST_BEGIN()
284 TEST("_1234_", "_%ji_", ((intmax_t)1234)); in TEST_BEGIN()
285 TEST("_01234_", "_%#jo_", ((intmax_t)01234)); in TEST_BEGIN()
286 TEST("_1234_", "_%ju_", ((intmax_t)1234)); in TEST_BEGIN()
287 TEST("_0x1234abc_", "_%#jx_", ((intmax_t)0x1234abc)); in TEST_BEGIN()
288 TEST("_0X1234ABC_", "_%#jX_", ((intmax_t)0x1234ABC)); in TEST_BEGIN()
290 TEST("_1234_", "_%td_", ((ptrdiff_t)1234)); in TEST_BEGIN()
291 TEST("_-1234_", "_%td_", ((ptrdiff_t)-1234)); in TEST_BEGIN()
292 TEST("_1234_", "_%ti_", ((ptrdiff_t)1234)); in TEST_BEGIN()
293 TEST("_-1234_", "_%ti_", ((ptrdiff_t)-1234)); in TEST_BEGIN()
295 TEST("_-1234_", "_%zd_", ((ssize_t)-1234)); in TEST_BEGIN()
296 TEST("_1234_", "_%zd_", ((ssize_t)1234)); in TEST_BEGIN()
297 TEST("_-1234_", "_%zi_", ((ssize_t)-1234)); in TEST_BEGIN()
298 TEST("_1234_", "_%zi_", ((ssize_t)1234)); in TEST_BEGIN()
299 TEST("_01234_", "_%#zo_", ((ssize_t)01234)); in TEST_BEGIN()
300 TEST("_1234_", "_%zu_", ((ssize_t)1234)); in TEST_BEGIN()
301 TEST("_0x1234abc_", "_%#zx_", ((ssize_t)0x1234abc)); in TEST_BEGIN()
302 TEST("_0X1234ABC_", "_%#zX_", ((ssize_t)0x1234ABC)); in TEST_BEGIN()