Lines Matching refs:buf

36     char8_t buf[1] = { 0 };  in test_utf8()  local
39 TEST_COMPARE (mbrtoc8 (buf, mbs, 0, &s), (size_t) -2); /* no input */ in test_utf8()
46 char8_t buf[1] = { 0 }; in test_utf8() local
49 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) 0); in test_utf8()
51 TEST_COMPARE (buf[0], 0x00); in test_utf8()
59 char8_t buf[1] = { 0 }; in test_utf8() local
62 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) 1); in test_utf8()
64 TEST_COMPARE (buf[0], 0x01); in test_utf8()
71 char8_t buf[1] = { 0 }; in test_utf8() local
74 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) 1); in test_utf8()
76 TEST_COMPARE (buf[0], 0x7F); in test_utf8()
83 char8_t buf[1] = { 0 }; in test_utf8() local
86 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) 2); in test_utf8()
88 TEST_COMPARE (buf[0], 0xC2); in test_utf8()
89 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) -3); in test_utf8()
90 TEST_COMPARE (buf[0], 0x80); in test_utf8()
97 char8_t buf[1] = { 0 }; in test_utf8() local
100 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -2); in test_utf8()
102 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) 1); in test_utf8()
104 TEST_COMPARE (buf[0], 0xC2); in test_utf8()
105 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -3); in test_utf8()
106 TEST_COMPARE (buf[0], 0x80); in test_utf8()
113 char8_t buf[1] = { 0 }; in test_utf8() local
116 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) 2); in test_utf8()
118 TEST_COMPARE (buf[0], 0xDF); in test_utf8()
119 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) -3); in test_utf8()
120 TEST_COMPARE (buf[0], 0xBF); in test_utf8()
127 char8_t buf[1] = { 0 }; in test_utf8() local
130 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -2); in test_utf8()
132 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) 1); in test_utf8()
134 TEST_COMPARE (buf[0], 0xDF); in test_utf8()
135 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -3); in test_utf8()
136 TEST_COMPARE (buf[0], 0xBF); in test_utf8()
143 char8_t buf[1] = { 0 }; in test_utf8() local
146 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) 3); in test_utf8()
148 TEST_COMPARE (buf[0], 0xE0); in test_utf8()
149 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) -3); in test_utf8()
150 TEST_COMPARE (buf[0], 0xA0); in test_utf8()
151 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) -3); in test_utf8()
152 TEST_COMPARE (buf[0], 0x80); in test_utf8()
159 char8_t buf[1] = { 0 }; in test_utf8() local
162 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -2); in test_utf8()
164 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -2); in test_utf8()
166 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) 1); in test_utf8()
168 TEST_COMPARE (buf[0], 0xE0); in test_utf8()
169 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -3); in test_utf8()
170 TEST_COMPARE (buf[0], 0xA0); in test_utf8()
171 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -3); in test_utf8()
172 TEST_COMPARE (buf[0], 0x80); in test_utf8()
180 char8_t buf[1] = { 0 }; in test_utf8() local
183 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) 3); in test_utf8()
185 TEST_COMPARE (buf[0], 0xED); in test_utf8()
186 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) -3); in test_utf8()
187 TEST_COMPARE (buf[0], 0x9F); in test_utf8()
188 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) -3); in test_utf8()
189 TEST_COMPARE (buf[0], 0xBF); in test_utf8()
196 char8_t buf[1] = { 0 }; in test_utf8() local
199 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -2); in test_utf8()
201 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -2); in test_utf8()
203 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) 1); in test_utf8()
205 TEST_COMPARE (buf[0], 0xED); in test_utf8()
206 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -3); in test_utf8()
207 TEST_COMPARE (buf[0], 0x9F); in test_utf8()
208 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -3); in test_utf8()
209 TEST_COMPARE (buf[0], 0xBF); in test_utf8()
217 char8_t buf[1] = { 0 }; in test_utf8() local
220 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) 3); in test_utf8()
222 TEST_COMPARE (buf[0], 0xEE); in test_utf8()
223 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) -3); in test_utf8()
224 TEST_COMPARE (buf[0], 0x80); in test_utf8()
225 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) -3); in test_utf8()
226 TEST_COMPARE (buf[0], 0x80); in test_utf8()
233 char8_t buf[1] = { 0 }; in test_utf8() local
236 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -2); in test_utf8()
238 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -2); in test_utf8()
240 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) 1); in test_utf8()
242 TEST_COMPARE (buf[0], 0xEE); in test_utf8()
243 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -3); in test_utf8()
244 TEST_COMPARE (buf[0], 0x80); in test_utf8()
245 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -3); in test_utf8()
246 TEST_COMPARE (buf[0], 0x80); in test_utf8()
253 char8_t buf[1] = { 0 }; in test_utf8() local
256 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) 3); in test_utf8()
258 TEST_COMPARE (buf[0], 0xEF); in test_utf8()
259 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) -3); in test_utf8()
260 TEST_COMPARE (buf[0], 0xBB); in test_utf8()
261 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) -3); in test_utf8()
262 TEST_COMPARE (buf[0], 0xBF); in test_utf8()
269 char8_t buf[1] = { 0 }; in test_utf8() local
272 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -2); in test_utf8()
274 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -2); in test_utf8()
276 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) 1); in test_utf8()
278 TEST_COMPARE (buf[0], 0xEF); in test_utf8()
279 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -3); in test_utf8()
280 TEST_COMPARE (buf[0], 0xBB); in test_utf8()
281 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -3); in test_utf8()
282 TEST_COMPARE (buf[0], 0xBF); in test_utf8()
289 char8_t buf[1] = { 0 }; in test_utf8() local
292 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) 3); in test_utf8()
294 TEST_COMPARE (buf[0], 0xEF); in test_utf8()
295 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) -3); in test_utf8()
296 TEST_COMPARE (buf[0], 0xBF); in test_utf8()
297 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) -3); in test_utf8()
298 TEST_COMPARE (buf[0], 0xBD); in test_utf8()
305 char8_t buf[1] = { 0 }; in test_utf8() local
308 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -2); in test_utf8()
310 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -2); in test_utf8()
312 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) 1); in test_utf8()
314 TEST_COMPARE (buf[0], 0xEF); in test_utf8()
315 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -3); in test_utf8()
316 TEST_COMPARE (buf[0], 0xBF); in test_utf8()
317 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -3); in test_utf8()
318 TEST_COMPARE (buf[0], 0xBD); in test_utf8()
325 char8_t buf[1] = { 0 }; in test_utf8() local
328 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) 3); in test_utf8()
330 TEST_COMPARE (buf[0], 0xEF); in test_utf8()
331 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) -3); in test_utf8()
332 TEST_COMPARE (buf[0], 0xBF); in test_utf8()
333 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) -3); in test_utf8()
334 TEST_COMPARE (buf[0], 0xBF); in test_utf8()
341 char8_t buf[1] = { 0 }; in test_utf8() local
344 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -2); in test_utf8()
346 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -2); in test_utf8()
348 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) 1); in test_utf8()
350 TEST_COMPARE (buf[0], 0xEF); in test_utf8()
351 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -3); in test_utf8()
352 TEST_COMPARE (buf[0], 0xBF); in test_utf8()
353 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -3); in test_utf8()
354 TEST_COMPARE (buf[0], 0xBF); in test_utf8()
361 char8_t buf[1] = { 0 }; in test_utf8() local
364 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) 4); in test_utf8()
366 TEST_COMPARE (buf[0], 0xF0); in test_utf8()
367 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) -3); in test_utf8()
368 TEST_COMPARE (buf[0], 0x90); in test_utf8()
369 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) -3); in test_utf8()
370 TEST_COMPARE (buf[0], 0x80); in test_utf8()
371 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) -3); in test_utf8()
372 TEST_COMPARE (buf[0], 0x80); in test_utf8()
379 char8_t buf[1] = { 0 }; in test_utf8() local
382 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -2); in test_utf8()
384 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -2); in test_utf8()
386 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -2); in test_utf8()
388 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) 1); in test_utf8()
390 TEST_COMPARE (buf[0], 0xF0); in test_utf8()
391 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -3); in test_utf8()
392 TEST_COMPARE (buf[0], 0x90); in test_utf8()
393 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -3); in test_utf8()
394 TEST_COMPARE (buf[0], 0x80); in test_utf8()
395 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -3); in test_utf8()
396 TEST_COMPARE (buf[0], 0x80); in test_utf8()
403 char8_t buf[1] = { 0 }; in test_utf8() local
406 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) 4); in test_utf8()
408 TEST_COMPARE (buf[0], 0xF4); in test_utf8()
409 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) -3); in test_utf8()
410 TEST_COMPARE (buf[0], 0x8F); in test_utf8()
411 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) -3); in test_utf8()
412 TEST_COMPARE (buf[0], 0xBF); in test_utf8()
413 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) -3); in test_utf8()
414 TEST_COMPARE (buf[0], 0xBF); in test_utf8()
421 char8_t buf[1] = { 0 }; in test_utf8() local
424 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -2); in test_utf8()
426 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -2); in test_utf8()
428 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -2); in test_utf8()
430 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) 1); in test_utf8()
432 TEST_COMPARE (buf[0], 0xF4); in test_utf8()
433 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -3); in test_utf8()
434 TEST_COMPARE (buf[0], 0x8F); in test_utf8()
435 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -3); in test_utf8()
436 TEST_COMPARE (buf[0], 0xBF); in test_utf8()
437 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -3); in test_utf8()
438 TEST_COMPARE (buf[0], 0xBF); in test_utf8()
454 char8_t buf[1] = { 0 }; in test_big5_hkscs() local
457 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) 2); in test_big5_hkscs()
459 TEST_COMPARE (buf[0], 0xC3); in test_big5_hkscs()
460 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) -3); in test_big5_hkscs()
461 TEST_COMPARE (buf[0], 0x8A); in test_big5_hkscs()
462 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) -3); in test_big5_hkscs()
463 TEST_COMPARE (buf[0], 0xCC); in test_big5_hkscs()
464 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) -3); in test_big5_hkscs()
465 TEST_COMPARE (buf[0], 0x84); in test_big5_hkscs()
472 char8_t buf[1] = { 0 }; in test_big5_hkscs() local
475 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -2); in test_big5_hkscs()
477 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) 1); in test_big5_hkscs()
479 TEST_COMPARE (buf[0], 0xC3); in test_big5_hkscs()
480 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -3); in test_big5_hkscs()
481 TEST_COMPARE (buf[0], 0x8A); in test_big5_hkscs()
482 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -3); in test_big5_hkscs()
483 TEST_COMPARE (buf[0], 0xCC); in test_big5_hkscs()
484 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -3); in test_big5_hkscs()
485 TEST_COMPARE (buf[0], 0x84); in test_big5_hkscs()
493 char8_t buf[1] = { 0 }; in test_big5_hkscs() local
496 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) 2); in test_big5_hkscs()
498 TEST_COMPARE (buf[0], 0xC3); in test_big5_hkscs()
499 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) -3); in test_big5_hkscs()
500 TEST_COMPARE (buf[0], 0xAA); in test_big5_hkscs()
501 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) -3); in test_big5_hkscs()
502 TEST_COMPARE (buf[0], 0xCC); in test_big5_hkscs()
503 TEST_COMPARE (mbrtoc8 (buf, mbs, strlen (mbs) + 1, &s), (size_t) -3); in test_big5_hkscs()
504 TEST_COMPARE (buf[0], 0x8C); in test_big5_hkscs()
511 char8_t buf[1] = { 0 }; in test_big5_hkscs() local
514 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -2); in test_big5_hkscs()
516 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) 1); in test_big5_hkscs()
518 TEST_COMPARE (buf[0], 0xC3); in test_big5_hkscs()
519 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -3); in test_big5_hkscs()
520 TEST_COMPARE (buf[0], 0xAA); in test_big5_hkscs()
521 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -3); in test_big5_hkscs()
522 TEST_COMPARE (buf[0], 0xCC); in test_big5_hkscs()
523 TEST_COMPARE (mbrtoc8 (buf, mbs, 1, &s), (size_t) -3); in test_big5_hkscs()
524 TEST_COMPARE (buf[0], 0x8C); in test_big5_hkscs()