| 467 | } |
| 468 | |
| 469 | void utest_assert_string(const char *a, const char *b, rt_bool_t equal, const char *file, int line, const char *func, const char *msg) |
| 470 | { |
| 471 | rt_bool_t rst = RT_FALSE; |
| 472 | |
| 473 | if (a == RT_NULL || b == RT_NULL) |
| 474 | { |
| 475 | rst = utest_assert(0, file, line, func, msg); |
| 476 | } |
| 477 | else |
| 478 | { |
| 479 | if (equal) |
| 480 | { |
| 481 | if (rt_strcmp(a, b) == 0) |
| 482 | { |
| 483 | rst = utest_assert(1, file, line, func, msg); |
| 484 | } |
| 485 | else |
| 486 | { |
| 487 | rst = utest_assert(0, file, line, func, msg); |
| 488 | } |
| 489 | } |
| 490 | else |
| 491 | { |
| 492 | if (rt_strcmp(a, b) == 0) |
| 493 | { |
| 494 | rst = utest_assert(0, file, line, func, msg); |
| 495 | } |
| 496 | else |
| 497 | { |
| 498 | rst = utest_assert(1, file, line, func, msg); |
| 499 | } |
| 500 | } |
| 501 | } |
| 502 | |
| 503 | if (!rst) |
| 504 | { |
| 505 | LOG_E("[ ASSERT ] [ unit ] str-a: (%s); str-b: (%s)", a, b); |
| 506 | } |
| 507 | } |
| 508 | |
| 509 | void utest_assert_buf(const char *a, const char *b, rt_size_t sz, rt_bool_t equal, const char *file, int line, const char *func, const char *msg) |
| 510 | { |
nothing calls this directly
no test coverage detected