MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / utest_assert_buf

Function utest_assert_buf

components/utilities/utest/utest.c:509–538  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

507}
508
509void 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{
511 if (a == RT_NULL || b == RT_NULL)
512 {
513 utest_assert(0, file, line, func, msg);
514 }
515
516 if (equal)
517 {
518 if (rt_memcmp(a, b, sz) == 0)
519 {
520 utest_assert(1, file, line, func, msg);
521 }
522 else
523 {
524 utest_assert(0, file, line, func, msg);
525 }
526 }
527 else
528 {
529 if (rt_memcmp(a, b, sz) == 0)
530 {
531 utest_assert(0, file, line, func, msg);
532 }
533 else
534 {
535 utest_assert(1, file, line, func, msg);
536 }
537 }
538}

Callers

nothing calls this directly

Calls 2

utest_assertFunction · 0.85
rt_memcmpFunction · 0.85

Tested by

no test coverage detected