Make use of assert_* in test/unit/thread_event.c
This commit is contained in:
parent
9d2cc3b0fa
commit
51bd147422
@ -15,7 +15,7 @@ TEST_BEGIN(test_next_event_fast_roll_back) {
|
|||||||
ITERATE_OVER_ALL_EVENTS
|
ITERATE_OVER_ALL_EVENTS
|
||||||
#undef E
|
#undef E
|
||||||
void *p = malloc(16U);
|
void *p = malloc(16U);
|
||||||
expect_ptr_not_null(p, "malloc() failed");
|
assert_ptr_not_null(p, "malloc() failed");
|
||||||
free(p);
|
free(p);
|
||||||
}
|
}
|
||||||
TEST_END
|
TEST_END
|
||||||
@ -37,7 +37,7 @@ TEST_BEGIN(test_next_event_fast_resume) {
|
|||||||
ITERATE_OVER_ALL_EVENTS
|
ITERATE_OVER_ALL_EVENTS
|
||||||
#undef E
|
#undef E
|
||||||
void *p = malloc(SC_LOOKUP_MAXCLASS);
|
void *p = malloc(SC_LOOKUP_MAXCLASS);
|
||||||
expect_ptr_not_null(p, "malloc() failed");
|
assert_ptr_not_null(p, "malloc() failed");
|
||||||
free(p);
|
free(p);
|
||||||
}
|
}
|
||||||
TEST_END
|
TEST_END
|
||||||
@ -50,7 +50,7 @@ TEST_BEGIN(test_event_rollback) {
|
|||||||
while (count-- != 0) {
|
while (count-- != 0) {
|
||||||
te_alloc_rollback(tsd, diff);
|
te_alloc_rollback(tsd, diff);
|
||||||
uint64_t thread_allocated_after = thread_allocated_get(tsd);
|
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 event counters are not properly rolled back");
|
||||||
thread_allocated = thread_allocated_after;
|
thread_allocated = thread_allocated_after;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user