diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/imd-test.c | 7 | ||||
-rw-r--r-- | tests/lib/stack-test.c | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/tests/lib/imd-test.c b/tests/lib/imd-test.c index dce542cf8f..c2bcf0cd2d 100644 --- a/tests/lib/imd-test.c +++ b/tests/lib/imd-test.c @@ -176,9 +176,10 @@ static void test_imd_create_tiered_empty(void **state) /* Fail when large region doesn't have capacity for more than 1 entry */ lg_region_wrong_size = sizeof(struct imd_root_pointer) + sizeof(struct imd_root) + sizeof(struct imd_entry); - assert_int_equal(-1, imd_create_tiered_empty(&imd, lg_region_wrong_size, - LG_ENTRY_ALIGN, SM_ROOT_SIZE, - SM_ENTRY_ALIGN)); + expect_assert_failure( + imd_create_tiered_empty(&imd, lg_region_wrong_size, LG_ENTRY_ALIGN, + SM_ROOT_SIZE, SM_ENTRY_ALIGN) + ); assert_int_equal(0, imd_create_tiered_empty(&imd, LG_ROOT_SIZE, LG_ENTRY_ALIGN, SM_ROOT_SIZE, SM_ENTRY_ALIGN)); diff --git a/tests/lib/stack-test.c b/tests/lib/stack-test.c index f494c086ad..bed59aaa76 100644 --- a/tests/lib/stack-test.c +++ b/tests/lib/stack-test.c @@ -73,7 +73,7 @@ static void test_full_stack(void **state) /* Expect failure when checking full stack as absence of guard value at the end of the stack indicates stack overrun. */ - assert_int_equal(-1, checkstack(top_of_stack, 0)); + expect_assert_failure(checkstack(top_of_stack, 0)); } static void test_partialy_filled_stack(void **state) @@ -115,7 +115,7 @@ static void test_incorrectly_initialized_stack(void **state) /* Expect failure when there is no last stack guard value even if no other value was changed. */ - assert_int_equal(-1, checkstack(top_of_stack, 0)); + expect_assert_failure(checkstack(top_of_stack, 0)); } int main(void) |