Lines Matching refs:a

56   _type a = va_arg(ap, _type), value = *((_type *) result); \
58 value = a; \
59 a = va_arg(ap, _type); \
62 if (! _func( (_type *) result, value, a)) \
183 int8_t a, b; in T_add_s8() local
184 a=SCHAR_MIN; b=-1; EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_s8()
185 a=SCHAR_MAX; b=1; EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_s8()
186 a=10; b=11; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_s8()
187 a=-10; b=-11; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_s8()
188 a=SCHAR_MIN; b=SCHAR_MAX; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_s8()
189 a=SCHAR_MIN+1; b=-1; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_s8()
190 a=SCHAR_MAX/2; b=SCHAR_MAX/2; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_s8()
196 int16_t a, b; in T_add_s16() local
197 a=SHRT_MIN; b=-1; EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_s16()
198 a=SHRT_MAX; b=1; EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_s16()
199 a=10; b=11; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_s16()
200 a=SHRT_MIN; b=SHRT_MAX; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_s16()
201 a=SHRT_MAX/2; b=SHRT_MAX/2; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_s16()
207 int32_t a, b; in T_add_s32() local
208 a=INT_MIN; b=-1; EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_s32()
209 a=INT_MAX; b=1; EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_s32()
210 a=10; b=11; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_s32()
211 a=INT_MIN; b=INT_MAX; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_s32()
212 a=INT_MAX/2; b=INT_MAX/2; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_s32()
218 int64_t a, b; in T_add_s64() local
219 a=SAFE_INT64_MIN; b=-1; EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_s64()
220 a=SAFE_INT64_MAX; b=1; EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_s64()
221 a=10; b=11; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_s64()
222 a=SAFE_INT64_MIN; b=SAFE_INT64_MAX; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_s64()
223 a=SAFE_INT64_MAX/2; b=SAFE_INT64_MAX/2; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_s64()
229 long a, b; in T_add_long() local
230 a=LONG_MIN; b=-1; EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_long()
231 a=LONG_MAX; b=1; EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_long()
232 a=10; b=11; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_long()
233 a=LONG_MIN; b=LONG_MAX; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_long()
234 a=LONG_MAX/2; b=LONG_MAX/2; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_long()
239 long long a, b; in T_add_longlong() local
240 a=LLONG_MIN; b=-1; EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_longlong()
241 a=LLONG_MAX; b=1; EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_longlong()
242 a=10; b=11; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_longlong()
243 a=LLONG_MIN; b=LLONG_MAX; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_longlong()
244 a=LLONG_MAX/2; b=LLONG_MAX/2; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_longlong()
249 ssize_t a, b; in T_add_ssizet() local
250 a=SSIZE_MIN; b=-1; EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_ssizet()
251 a=SSIZE_MAX; b=1; EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_ssizet()
252 a=10; b=11; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_ssizet()
253 a=SSIZE_MIN; b=SSIZE_MAX; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_ssizet()
254 a=SSIZE_MAX/2; b=SSIZE_MAX/2; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_ssizet()
260 uint8_t a, b; in T_add_u8() local
261 a=1; b=UCHAR_MAX; EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_u8()
262 a=UCHAR_MAX/2; b=a+2; EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_u8()
263 a=UCHAR_MAX/2; b=a; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_u8()
264 a=UCHAR_MAX/2; b=a+1; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_u8()
265 a=10; b=11; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_u8()
266 a=0; b=UCHAR_MAX; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_u8()
272 uint16_t a, b; in T_add_u16() local
273 a=1; b=USHRT_MAX; EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_u16()
274 a=USHRT_MAX/2; b=a+2; EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_u16()
275 a=USHRT_MAX/2; b=a; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_u16()
276 a=USHRT_MAX/2; b=a+1; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_u16()
277 a=10; b=11; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_u16()
278 a=0; b=USHRT_MAX; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_u16()
284 uint32_t a, b; in T_add_u32() local
285 a=1; b=UINT_MAX; EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_u32()
286 a=UINT_MAX/2; b=a+2; EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_u32()
287 a=UINT_MAX/2; b=a; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_u32()
288 a=UINT_MAX/2; b=a+1; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_u32()
289 a=10; b=11; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_u32()
290 a=0; b=UINT_MAX; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_u32()
296 uint64_t a, b; in T_add_u64() local
297 a=1; b=SAFE_UINT64_MAX; EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_u64()
298 a=SAFE_UINT64_MAX/2; b=a+2; EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_u64()
299 a=SAFE_UINT64_MAX/2; b=a; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_u64()
300 a=SAFE_UINT64_MAX/2; b=a+1; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_u64()
301 a=10; b=11; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_u64()
302 a=0; b=SAFE_UINT64_MAX; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_u64()
308 unsigned long a, b; in T_add_ulong() local
309 a=1; b=ULONG_MAX; EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_ulong()
310 a=ULONG_MAX/2; b=a+2; EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_ulong()
311 a=ULONG_MAX/2; b=a; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_ulong()
312 a=ULONG_MAX/2; b=a+1; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_ulong()
313 a=10; b=11; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_ulong()
314 a=0; b=ULONG_MAX; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_ulong()
320 unsigned long long a, b; in T_add_ulonglong() local
321 a=1; b=ULLONG_MAX; EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_ulonglong()
322 a=ULLONG_MAX/2; b=a+2; EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_ulonglong()
323 a=ULLONG_MAX/2; b=a; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_ulonglong()
324 a=ULLONG_MAX/2; b=a+1; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_ulonglong()
325 a=10; b=11; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_ulonglong()
326 a=0; b=ULLONG_MAX; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_ulonglong()
332 size_t a, b; in T_add_sizet() local
333 a=1; b=SIZE_MAX; EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_sizet()
334 a=SIZE_MAX/2; b=a+2; EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_sizet()
335 a=SIZE_MAX/2; b=a; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_sizet()
336 a=SIZE_MAX/2; b=a+1; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_sizet()
337 a=10; b=11; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_sizet()
338 a=0; b=SIZE_MAX; EXPECT_TRUE(safe_add(NULL, a, b)); in T_add_sizet()
344 int8_t a = 1; in T_add_mixed() local
347 EXPECT_FALSE(safe_add(NULL, a, b)); in T_add_mixed()
349 EXPECT_FALSE(safe_add(NULL, a, c)); in T_add_mixed()
350 EXPECT_FALSE(safe_add3(NULL, a, b, c)); in T_add_mixed()
356 uint16_t a = 1, b = 2, c = 0, d[2]= {0}; in T_add_increment() local
358 EXPECT_TRUE(safe_add(cur++, a++, b)); in T_add_increment()
361 EXPECT_TRUE(a == 2); in T_add_increment()
362 a = 1; b = 2; c = 1; cur=d;d[0] = 0; in T_add_increment()
363 EXPECT_TRUE(safe_add3(cur++, a++, b++, c)); in T_add_increment()
366 EXPECT_TRUE(a == 2); in T_add_increment()
377 int8_t a, b; in T_sub_s8() local
378 a=SCHAR_MIN; b=1; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_s8()
379 a=SCHAR_MIN; b=SCHAR_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_s8()
380 a=SCHAR_MIN/2; b=SCHAR_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_s8()
381 a=-2; b=SCHAR_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_s8()
382 a=SCHAR_MAX; b=SCHAR_MAX; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_s8()
383 a=10; b=2; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_s8()
384 a=2; b=10; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_s8()
390 int16_t a, b; in T_sub_s16() local
391 a=SHRT_MIN; b=1; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_s16()
392 a=SHRT_MIN; b=SHRT_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_s16()
393 a=SHRT_MIN/2; b=SHRT_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_s16()
394 a=-2; b=SHRT_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_s16()
395 a=SHRT_MAX; b=SHRT_MAX; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_s16()
396 a=10; b=2; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_s16()
397 a=2; b=10; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_s16()
403 int32_t a, b; in T_sub_s32() local
404 a=INT_MIN; b=1; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_s32()
405 a=INT_MIN; b=INT_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_s32()
406 a=INT_MIN/2; b=INT_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_s32()
407 a=-2; b=INT_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_s32()
408 a=INT_MAX; b=INT_MAX; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_s32()
409 a=10; b=2; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_s32()
410 a=2; b=10; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_s32()
416 int64_t a, b; in T_sub_s64() local
417 a=SAFE_INT64_MIN; b=1; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_s64()
418 a=SAFE_INT64_MIN; b=SAFE_INT64_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_s64()
419 a=SAFE_INT64_MIN/2; b=SAFE_INT64_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_s64()
420 a=-2; b=SAFE_INT64_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_s64()
421 a=SAFE_INT64_MAX; b=SAFE_INT64_MAX; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_s64()
422 a=10; b=2; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_s64()
423 a=2; b=10; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_s64()
429 long a, b; in T_sub_long() local
430 a=LONG_MIN; b=1; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_long()
431 a=LONG_MIN; b=LONG_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_long()
432 a=LONG_MIN/2; b=LONG_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_long()
433 a=-2; b=LONG_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_long()
434 a=LONG_MAX; b=LONG_MAX; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_long()
435 a=10; b=2; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_long()
436 a=2; b=10; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_long()
442 long long a, b; in T_sub_longlong() local
443 a=LLONG_MIN; b=1; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_longlong()
444 a=LLONG_MIN; b=LLONG_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_longlong()
445 a=LLONG_MIN/2; b=LLONG_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_longlong()
446 a=-2; b=LLONG_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_longlong()
447 a=LLONG_MAX; b=LLONG_MAX; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_longlong()
448 a=10; b=2; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_longlong()
449 a=2; b=10; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_longlong()
455 ssize_t a, b; in T_sub_ssizet() local
456 a=SSIZE_MIN; b=1; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_ssizet()
457 a=SSIZE_MIN; b=SSIZE_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_ssizet()
458 a=SSIZE_MIN/2; b=SSIZE_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_ssizet()
459 a=-2; b=SSIZE_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_ssizet()
460 a=SSIZE_MAX; b=SSIZE_MAX; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_ssizet()
461 a=10; b=2; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_ssizet()
462 a=2; b=10; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_ssizet()
468 uint8_t a, b; in T_sub_u8() local
469 a=0; b=UCHAR_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_u8()
470 a=UCHAR_MAX-1; b=UCHAR_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_u8()
471 a=UCHAR_MAX; b=UCHAR_MAX; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_u8()
472 a=1; b=100; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_u8()
473 a=100; b=0; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_u8()
474 a=10; b=2; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_u8()
475 a=0; b=0; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_u8()
481 uint16_t a, b; in T_sub_u16() local
482 a=0; b=USHRT_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_u16()
483 a=USHRT_MAX-1; b=USHRT_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_u16()
484 a=USHRT_MAX; b=USHRT_MAX; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_u16()
485 a=1; b=100; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_u16()
486 a=100; b=0; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_u16()
487 a=10; b=2; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_u16()
488 a=0; b=0; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_u16()
494 uint32_t a, b; in T_sub_u32() local
495 a=UINT_MAX-1; b=UINT_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_u32()
496 a=UINT_MAX; b=UINT_MAX; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_u32()
497 a=1; b=100; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_u32()
498 a=100; b=0; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_u32()
499 a=10; b=2; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_u32()
500 a=0; b=0; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_u32()
506 uint64_t a, b; in T_sub_u64() local
507 a=SAFE_UINT64_MAX-1; b=SAFE_UINT64_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_u64()
508 a=SAFE_UINT64_MAX; b=SAFE_UINT64_MAX; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_u64()
509 a=1; b=100; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_u64()
510 a=100; b=0; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_u64()
511 a=10; b=2; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_u64()
512 a=0; b=0; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_u64()
518 unsigned long a, b; in T_sub_ulong() local
519 a=ULONG_MAX-1; b=ULONG_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_ulong()
520 a=ULONG_MAX; b=ULONG_MAX; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_ulong()
521 a=1; b=100; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_ulong()
522 a=100; b=0; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_ulong()
523 a=10; b=2; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_ulong()
524 a=0; b=0; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_ulong()
530 unsigned long long a, b; in T_sub_ulonglong() local
531 a=ULLONG_MAX-1; b=ULLONG_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_ulonglong()
532 a=ULLONG_MAX; b=ULLONG_MAX; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_ulonglong()
533 a=1; b=100; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_ulonglong()
534 a=100; b=0; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_ulonglong()
535 a=10; b=2; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_ulonglong()
536 a=0; b=0; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_ulonglong()
542 size_t a, b; in T_sub_sizet() local
543 a=SIZE_MAX-1; b=SIZE_MAX; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_sizet()
544 a=SIZE_MAX; b=SIZE_MAX; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_sizet()
545 a=1; b=100; EXPECT_FALSE(safe_sub(NULL, a, b)); in T_sub_sizet()
546 a=100; b=0; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_sizet()
547 a=10; b=2; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_sizet()
548 a=0; b=0; EXPECT_TRUE(safe_sub(NULL, a, b)); in T_sub_sizet()
555 int8_t a, b; in T_mul_s8() local
556 a=SCHAR_MIN; b=-1; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_s8()
557 a=SCHAR_MIN; b=-2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_s8()
558 a=SCHAR_MAX; b=SCHAR_MAX; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_s8()
559 a=SCHAR_MAX/2+1; b=2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_s8()
560 a=SCHAR_MAX/2; b=2; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s8()
561 a=100; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s8()
562 a=10; b=2; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s8()
563 a=SCHAR_MAX; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s8()
564 a=SCHAR_MIN; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s8()
565 a=0; b=SCHAR_MAX; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s8()
566 a=0; b=SCHAR_MIN; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s8()
567 a=0; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s8()
573 int16_t a, b; in T_mul_s16() local
574 a=SHRT_MIN; b=-1; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_s16()
575 a=SHRT_MIN; b=-2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_s16()
576 a=SHRT_MAX; b=SHRT_MAX; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_s16()
577 a=SHRT_MAX/2+1; b=2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_s16()
578 a=SHRT_MAX/2; b=2; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s16()
579 a=100; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s16()
580 a=10; b=2; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s16()
581 a=SHRT_MAX; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s16()
582 a=SHRT_MIN; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s16()
583 a=0; b=SHRT_MAX; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s16()
584 a=0; b=SHRT_MIN; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s16()
585 a=0; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s16()
591 int32_t a, b; in T_mul_s32() local
592 a=INT_MIN; b=-1; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_s32()
593 a=INT_MIN; b=-2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_s32()
594 a=INT_MAX; b=INT_MAX; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_s32()
595 a=INT_MAX/2+1; b=2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_s32()
596 a=INT_MAX/2; b=2; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s32()
597 a=100; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s32()
598 a=10; b=2; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s32()
599 a=INT_MAX; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s32()
600 a=INT_MIN; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s32()
601 a=0; b=INT_MAX; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s32()
602 a=0; b=INT_MIN; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s32()
603 a=0; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s32()
609 int64_t a, b; in T_mul_s64() local
610 a=SAFE_INT64_MIN; b=-1; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_s64()
611 a=SAFE_INT64_MIN; b=-2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_s64()
612 a=SAFE_INT64_MAX; b=SAFE_INT64_MAX; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_s64()
613 a=SAFE_INT64_MAX/2+1; b=2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_s64()
614 a=SAFE_INT64_MAX/2; b=2; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s64()
615 a=100; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s64()
616 a=10; b=2; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s64()
617 a=SAFE_INT64_MAX; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s64()
618 a=SAFE_INT64_MIN; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s64()
619 a=0; b=SAFE_INT64_MAX; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s64()
620 a=0; b=SAFE_INT64_MIN; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s64()
621 a=0; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_s64()
627 long a, b; in T_mul_long() local
628 a=LONG_MIN; b=-1; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_long()
629 a=LONG_MIN; b=-2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_long()
630 a=LONG_MAX; b=LONG_MAX; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_long()
631 a=LONG_MAX/2+1; b=2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_long()
632 a=LONG_MAX/2; b=2; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_long()
633 a=100; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_long()
634 a=10; b=2; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_long()
635 a=LONG_MAX; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_long()
636 a=LONG_MIN; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_long()
637 a=0; b=LONG_MAX; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_long()
638 a=0; b=LONG_MIN; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_long()
639 a=0; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_long()
644 long long a, b; in T_mul_longlong() local
645 a=LLONG_MIN; b=-1; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_longlong()
646 a=LLONG_MIN; b=-2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_longlong()
647 a=LLONG_MAX; b=LLONG_MAX; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_longlong()
648 a=LLONG_MAX/2+1; b=2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_longlong()
649 a=LLONG_MAX/2; b=2; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_longlong()
650 a=100; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_longlong()
651 a=10; b=2; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_longlong()
652 a=LLONG_MAX; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_longlong()
653 a=LLONG_MIN; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_longlong()
654 a=0; b=LLONG_MAX; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_longlong()
655 a=0; b=LLONG_MIN; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_longlong()
656 a=0; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_longlong()
661 ssize_t a, b; in T_mul_ssizet() local
662 a=SSIZE_MIN; b=-1; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_ssizet()
663 a=SSIZE_MIN; b=-2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_ssizet()
664 a=SSIZE_MAX; b=SSIZE_MAX; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_ssizet()
665 a=SSIZE_MAX/2+1; b=2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_ssizet()
666 a=SSIZE_MAX/2; b=2; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_ssizet()
667 a=100; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_ssizet()
668 a=10; b=2; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_ssizet()
669 a=SSIZE_MAX; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_ssizet()
670 a=SSIZE_MIN; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_ssizet()
671 a=0; b=SSIZE_MAX; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_ssizet()
672 a=0; b=SSIZE_MIN; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_ssizet()
673 a=0; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_ssizet()
679 uint8_t a, b; in T_mul_u8() local
680 a=UCHAR_MAX-1; b=2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_u8()
681 a=2; b=UCHAR_MAX-1; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_u8()
682 a=UCHAR_MAX; b=2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_u8()
683 a=2; b=UCHAR_MAX; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_u8()
684 a=UCHAR_MAX/2+1; b=2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_u8()
685 a=2; b=UCHAR_MAX/2+1; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_u8()
686 a=UCHAR_MAX/2; b=2; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_u8()
687 a=0; b=UCHAR_MAX; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_u8()
688 a=1; b=UCHAR_MAX; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_u8()
689 a=UCHAR_MAX; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_u8()
690 a=UCHAR_MAX; b=1; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_u8()
691 a=10; b=2; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_u8()
697 uint16_t a, b; in T_mul_u16() local
698 a=USHRT_MAX-1; b=2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_u16()
699 a=2; b=USHRT_MAX-1; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_u16()
700 a=USHRT_MAX; b=2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_u16()
701 a=2; b=USHRT_MAX; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_u16()
702 a=USHRT_MAX/2+1; b=2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_u16()
703 a=2; b=USHRT_MAX/2+1; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_u16()
704 a=USHRT_MAX/2; b=2; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_u16()
705 a=0; b=USHRT_MAX; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_u16()
706 a=1; b=USHRT_MAX; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_u16()
707 a=USHRT_MAX; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_u16()
708 a=USHRT_MAX; b=1; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_u16()
709 a=10; b=2; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_u16()
715 uint32_t a, b; in T_mul_u32() local
716 a=UINT_MAX-1; b=2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_u32()
717 a=2; b=UINT_MAX-1; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_u32()
718 a=UINT_MAX; b=2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_u32()
719 a=2; b=UINT_MAX; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_u32()
720 a=UINT_MAX/2+1; b=2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_u32()
721 a=2; b=UINT_MAX/2+1; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_u32()
722 a=UINT_MAX/2; b=2; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_u32()
723 a=0; b=UINT_MAX; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_u32()
724 a=1; b=UINT_MAX; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_u32()
725 a=UINT_MAX; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_u32()
726 a=UINT_MAX; b=1; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_u32()
727 a=10; b=2; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_u32()
733 uint64_t a, b; in T_mul_u64() local
734 a=SAFE_UINT64_MAX-1; b=2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_u64()
735 a=2; b=SAFE_UINT64_MAX-1; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_u64()
736 a=SAFE_UINT64_MAX; b=2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_u64()
737 a=2; b=SAFE_UINT64_MAX; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_u64()
738 a=SAFE_UINT64_MAX/2+1; b=2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_u64()
739 a=2; b=SAFE_UINT64_MAX/2+1; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_u64()
740 a=SAFE_UINT64_MAX/2; b=2; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_u64()
741 a=0; b=SAFE_UINT64_MAX; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_u64()
742 a=1; b=SAFE_UINT64_MAX; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_u64()
743 a=SAFE_UINT64_MAX; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_u64()
744 a=SAFE_UINT64_MAX; b=1; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_u64()
745 a=10; b=2; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_u64()
751 unsigned long a, b; in T_mul_ulong() local
752 a=ULONG_MAX-1; b=2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_ulong()
753 a=2; b=ULONG_MAX-1; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_ulong()
754 a=ULONG_MAX; b=2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_ulong()
755 a=2; b=ULONG_MAX; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_ulong()
756 a=ULONG_MAX/2+1; b=2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_ulong()
757 a=2; b=ULONG_MAX/2+1; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_ulong()
758 a=ULONG_MAX/2; b=2; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_ulong()
759 a=0; b=ULONG_MAX; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_ulong()
760 a=1; b=ULONG_MAX; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_ulong()
761 a=ULONG_MAX; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_ulong()
762 a=ULONG_MAX; b=1; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_ulong()
763 a=10; b=2; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_ulong()
769 unsigned long long a, b; in T_mul_ulonglong() local
770 a=ULLONG_MAX-1; b=2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_ulonglong()
771 a=2; b=ULLONG_MAX-1; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_ulonglong()
772 a=ULLONG_MAX; b=2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_ulonglong()
773 a=2; b=ULLONG_MAX; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_ulonglong()
774 a=ULLONG_MAX/2+1; b=2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_ulonglong()
775 a=2; b=ULLONG_MAX/2+1; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_ulonglong()
776 a=ULLONG_MAX/2; b=2; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_ulonglong()
777 a=0; b=ULLONG_MAX; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_ulonglong()
778 a=1; b=ULLONG_MAX; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_ulonglong()
779 a=ULLONG_MAX; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_ulonglong()
780 a=ULLONG_MAX; b=1; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_ulonglong()
781 a=10; b=2; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_ulonglong()
787 size_t a, b; in T_mul_sizet() local
788 a=SIZE_MAX-1; b=2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_sizet()
789 a=2; b=SIZE_MAX-1; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_sizet()
790 a=SIZE_MAX; b=2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_sizet()
791 a=2; b=SIZE_MAX; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_sizet()
792 a=SIZE_MAX/2+1; b=2; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_sizet()
793 a=2; b=SIZE_MAX/2+1; EXPECT_FALSE(safe_mul(NULL, a, b)); in T_mul_sizet()
794 a=SIZE_MAX/2; b=2; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_sizet()
795 a=0; b=SIZE_MAX; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_sizet()
796 a=1; b=SIZE_MAX; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_sizet()
797 a=SIZE_MAX; b=0; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_sizet()
798 a=SIZE_MAX; b=1; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_sizet()
799 a=10; b=2; EXPECT_TRUE(safe_mul(NULL, a, b)); in T_mul_sizet()
806 int8_t a, b; in T_mod_s8() local
807 a=SCHAR_MIN; b=-1; EXPECT_FALSE(safe_mod(NULL, a, b)); in T_mod_s8()
808 a=100; b=0; EXPECT_FALSE(safe_mod(NULL, a, b)); in T_mod_s8()
809 a=10; b=2; EXPECT_TRUE(safe_mod(NULL, a, b)); in T_mod_s8()
815 int16_t a, b; in T_mod_s16() local
816 a=SHRT_MIN; b=-1; EXPECT_FALSE(safe_mod(NULL, a, b)); in T_mod_s16()
817 a=100; b=0; EXPECT_FALSE(safe_mod(NULL, a, b)); in T_mod_s16()
818 a=10; b=2; EXPECT_TRUE(safe_mod(NULL, a, b)); in T_mod_s16()
824 int32_t a, b; in T_mod_s32() local
825 a=INT_MIN; b=-1; EXPECT_FALSE(safe_mod(NULL, a, b)); in T_mod_s32()
826 a=100; b=0; EXPECT_FALSE(safe_mod(NULL, a, b)); in T_mod_s32()
827 a=10; b=2; EXPECT_TRUE(safe_mod(NULL, a, b)); in T_mod_s32()
833 int64_t a, b; in T_mod_s64() local
834 a=SAFE_INT64_MIN; b=-1; EXPECT_FALSE(safe_mod(NULL, a, b)); in T_mod_s64()
835 a=100; b=0; EXPECT_FALSE(safe_mod(NULL, a, b)); in T_mod_s64()
836 a=10; b=2; EXPECT_TRUE(safe_mod(NULL, a, b)); in T_mod_s64()
842 long a, b; in T_mod_long() local
843 a=LONG_MIN; b=-1; EXPECT_FALSE(safe_mod(NULL, a, b)); in T_mod_long()
844 a=100; b=0; EXPECT_FALSE(safe_mod(NULL, a, b)); in T_mod_long()
845 a=10; b=2; EXPECT_TRUE(safe_mod(NULL, a, b)); in T_mod_long()
850 long long a, b; in T_mod_longlong() local
851 a=LLONG_MIN; b=-1LL; EXPECT_FALSE(safe_mod(NULL, a, b)); in T_mod_longlong()
852 a=100LL; b=0LL; EXPECT_FALSE(safe_mod(NULL, a, b)); in T_mod_longlong()
853 a=10LL; b=2LL; EXPECT_TRUE(safe_mod(NULL, a, b)); in T_mod_longlong()
858 ssize_t a, b; in T_mod_ssizet() local
859 a=SSIZE_MIN; b=-1; EXPECT_FALSE(safe_mod(NULL, a, b)); in T_mod_ssizet()
860 a=100; b=0; EXPECT_FALSE(safe_mod(NULL, a, b)); in T_mod_ssizet()
861 a=10; b=2; EXPECT_TRUE(safe_mod(NULL, a, b)); in T_mod_ssizet()
867 uint8_t a, b; in T_mod_u8() local
868 a=0; b=UCHAR_MAX; EXPECT_TRUE(safe_mod(NULL, a, b)); in T_mod_u8()
869 a=100; b=0; EXPECT_FALSE(safe_mod(NULL, a, b)); in T_mod_u8()
870 a=10; b=2; EXPECT_TRUE(safe_mod(NULL, a, b)); in T_mod_u8()
876 uint16_t a, b; in T_mod_u16() local
877 a=0; b=USHRT_MAX; EXPECT_TRUE(safe_mod(NULL, a, b)); in T_mod_u16()
878 a=100; b=0; EXPECT_FALSE(safe_mod(NULL, a, b)); in T_mod_u16()
879 a=10; b=2; EXPECT_TRUE(safe_mod(NULL, a, b)); in T_mod_u16()
885 uint32_t a, b; in T_mod_u32() local
886 a=0; b=UINT_MAX; EXPECT_TRUE(safe_mod(NULL, a, b)); in T_mod_u32()
887 a=100; b=0; EXPECT_FALSE(safe_mod(NULL, a, b)); in T_mod_u32()
888 a=10; b=2; EXPECT_TRUE(safe_mod(NULL, a, b)); in T_mod_u32()
894 uint64_t a, b; in T_mod_u64() local
895 a=0; b=SAFE_INT64_MAX; EXPECT_TRUE(safe_mod(NULL, a, b)); in T_mod_u64()
896 a=100; b=0; EXPECT_FALSE(safe_mod(NULL, a, b)); in T_mod_u64()
897 a=10; b=2; EXPECT_TRUE(safe_mod(NULL, a, b)); in T_mod_u64()
903 unsigned long a, b; in T_mod_ulong() local
904 a=0; b=LONG_MAX; EXPECT_TRUE(safe_mod(NULL, a, b)); in T_mod_ulong()
905 a=100; b=0; EXPECT_FALSE(safe_mod(NULL, a, b)); in T_mod_ulong()
906 a=10; b=2; EXPECT_TRUE(safe_mod(NULL, a, b)); in T_mod_ulong()
912 unsigned long long a, b; in T_mod_ulonglong() local
913 a=0ULL; b=~0ULL; EXPECT_TRUE(safe_mod(NULL, a, b)); in T_mod_ulonglong()
914 a=100ULL; b=0ULL; EXPECT_FALSE(safe_mod(NULL, a, b)); in T_mod_ulonglong()
915 a=10ULL; b=2ULL; EXPECT_TRUE(safe_mod(NULL, a, b)); in T_mod_ulonglong()
921 size_t a, b; in T_mod_sizet() local
922 a=0; b=SIZE_MAX; EXPECT_TRUE(safe_mod(NULL, a, b)); in T_mod_sizet()
923 a=100; b=0; EXPECT_FALSE(safe_mod(NULL, a, b)); in T_mod_sizet()
924 a=10; b=2; EXPECT_TRUE(safe_mod(NULL, a, b)); in T_mod_sizet()
931 int8_t a, b; in T_div_s8() local
932 a=SCHAR_MIN; b=-1; EXPECT_FALSE(safe_div(NULL, a, b)); in T_div_s8()
933 a=100; b=0; EXPECT_FALSE(safe_div(NULL, a, b)); in T_div_s8()
934 a=10; b=2; EXPECT_TRUE(safe_div(NULL, a, b)); in T_div_s8()
940 int16_t a, b; in T_div_s16() local
941 a=SHRT_MIN; b=-1; EXPECT_FALSE(safe_div(NULL, a, b)); in T_div_s16()
942 a=100; b=0; EXPECT_FALSE(safe_div(NULL, a, b)); in T_div_s16()
943 a=10; b=2; EXPECT_TRUE(safe_div(NULL, a, b)); in T_div_s16()
949 int32_t a, b; in T_div_s32() local
950 a=INT_MIN; b=-1; EXPECT_FALSE(safe_div(NULL, a, b)); in T_div_s32()
951 a=100; b=0; EXPECT_FALSE(safe_div(NULL, a, b)); in T_div_s32()
952 a=10; b=2; EXPECT_TRUE(safe_div(NULL, a, b)); in T_div_s32()
958 int64_t a, b; in T_div_s64() local
959 a=SAFE_INT64_MIN; b=-1; EXPECT_FALSE(safe_div(NULL, a, b)); in T_div_s64()
960 a=100; b=0; EXPECT_FALSE(safe_div(NULL, a, b)); in T_div_s64()
961 a=10; b=2; EXPECT_TRUE(safe_div(NULL, a, b)); in T_div_s64()
967 long a, b; in T_div_long() local
968 a=LONG_MIN; b=-1; EXPECT_FALSE(safe_div(NULL, a, b)); in T_div_long()
969 a=100; b=0; EXPECT_FALSE(safe_div(NULL, a, b)); in T_div_long()
970 a=10; b=2; EXPECT_TRUE(safe_div(NULL, a, b)); in T_div_long()
975 long long a, b; in T_div_longlong() local
976 a=LLONG_MIN; b=-1LL; EXPECT_FALSE(safe_div(NULL, a, b)); in T_div_longlong()
977 a=100LL; b=0LL; EXPECT_FALSE(safe_div(NULL, a, b)); in T_div_longlong()
978 a=10LL; b=2LL; EXPECT_TRUE(safe_div(NULL, a, b)); in T_div_longlong()
983 ssize_t a, b; in T_div_ssizet() local
984 a=SSIZE_MIN; b=-1; EXPECT_FALSE(safe_div(NULL, a, b)); in T_div_ssizet()
985 a=100; b=0; EXPECT_FALSE(safe_div(NULL, a, b)); in T_div_ssizet()
986 a=10; b=2; EXPECT_TRUE(safe_div(NULL, a, b)); in T_div_ssizet()
992 uint8_t a, b; in T_div_u8() local
993 a=0; b=UCHAR_MAX; EXPECT_TRUE(safe_div(NULL, a, b)); in T_div_u8()
994 a=100; b=0; EXPECT_FALSE(safe_div(NULL, a, b)); in T_div_u8()
995 a=10; b=2; EXPECT_TRUE(safe_div(NULL, a, b)); in T_div_u8()
1001 uint16_t a, b; in T_div_u16() local
1002 a=0; b=USHRT_MAX; EXPECT_TRUE(safe_div(NULL, a, b)); in T_div_u16()
1003 a=100; b=0; EXPECT_FALSE(safe_div(NULL, a, b)); in T_div_u16()
1004 a=10; b=2; EXPECT_TRUE(safe_div(NULL, a, b)); in T_div_u16()
1010 uint32_t a, b; in T_div_u32() local
1011 a=0; b=UINT_MAX; EXPECT_TRUE(safe_div(NULL, a, b)); in T_div_u32()
1012 a=100; b=0; EXPECT_FALSE(safe_div(NULL, a, b)); in T_div_u32()
1013 a=10; b=2; EXPECT_TRUE(safe_div(NULL, a, b)); in T_div_u32()
1019 uint64_t a, b; in T_div_u64() local
1020 a=0; b=SAFE_INT64_MAX; EXPECT_TRUE(safe_div(NULL, a, b)); in T_div_u64()
1021 a=100; b=0; EXPECT_FALSE(safe_div(NULL, a, b)); in T_div_u64()
1022 a=10; b=2; EXPECT_TRUE(safe_div(NULL, a, b)); in T_div_u64()
1028 unsigned long a, b; in T_div_ulong() local
1029 a=0; b=LONG_MAX; EXPECT_TRUE(safe_div(NULL, a, b)); in T_div_ulong()
1030 a=100; b=0; EXPECT_FALSE(safe_div(NULL, a, b)); in T_div_ulong()
1031 a=10; b=2; EXPECT_TRUE(safe_div(NULL, a, b)); in T_div_ulong()
1037 unsigned long long a, b; in T_div_ulonglong() local
1038 a=0ULL; b=~0ULL; EXPECT_TRUE(safe_div(NULL, a, b)); in T_div_ulonglong()
1039 a=100ULL; b=0ULL; EXPECT_FALSE(safe_div(NULL, a, b)); in T_div_ulonglong()
1040 a=10ULL; b=2ULL; EXPECT_TRUE(safe_div(NULL, a, b)); in T_div_ulonglong()
1046 size_t a, b; in T_div_sizet() local
1047 a=0; b=SIZE_MAX; EXPECT_TRUE(safe_div(NULL, a, b)); in T_div_sizet()
1048 a=100; b=0; EXPECT_FALSE(safe_div(NULL, a, b)); in T_div_sizet()
1049 a=10; b=2; EXPECT_TRUE(safe_div(NULL, a, b)); in T_div_sizet()