From 51bd147422d95bfcd3919f11a6a7dd7a574e05cd Mon Sep 17 00:00:00 2001 From: Yinan Zhang Date: Thu, 6 Feb 2020 10:57:47 -0800 Subject: [PATCH] Make use of assert_* in test/unit/thread_event.c --- test/unit/thread_event.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/unit/thread_event.c b/test/unit/thread_event.c index ef3b95ce..0855829c 100644 --- a/test/unit/thread_event.c +++ b/test/unit/thread_event.c @@ -15,7 +15,7 @@ TEST_BEGIN(test_next_event_fast_roll_back) { ITERATE_OVER_ALL_EVENTS #undef E void *p = malloc(16U); - expect_ptr_not_null(p, "malloc() failed"); + assert_ptr_not_null(p, "malloc() failed"); free(p); } TEST_END @@ -37,7 +37,7 @@ TEST_BEGIN(test_next_event_fast_resume) { ITERATE_OVER_ALL_EVENTS #undef E void *p = malloc(SC_LOOKUP_MAXCLASS); - expect_ptr_not_null(p, "malloc() failed"); + assert_ptr_not_null(p, "malloc() failed"); free(p); } TEST_END @@ -50,7 +50,7 @@ TEST_BEGIN(test_event_rollback) { while (count-- != 0) { te_alloc_rollback(tsd, diff); uint64_t thread_allocated_after = thread_allocated_get(tsd); - expect_u64_eq(thread_allocated - thread_allocated_after, diff, + assert_u64_eq(thread_allocated - thread_allocated_after, diff, "thread event counters are not properly rolled back"); thread_allocated = thread_allocated_after; }