diff --git a/tests/test_array_list.c b/tests/test_array_list.c index 2e8316a..964458d 100644 --- a/tests/test_array_list.c +++ b/tests/test_array_list.c @@ -12,8 +12,6 @@ static void test_destroyer(void* item) { void test_array_list() { ArrayList* list = array_list_create(free); EXPECT_NOT_NULL(list); - if (!list) - return; EXPECT_EQ_INT(list->size, 0); EXPECT_EQ_INT(list->capacity, 100); diff --git a/tests/test_property.c b/tests/test_property.c index 4a2f45d..0dc601a 100644 --- a/tests/test_property.c +++ b/tests/test_property.c @@ -25,16 +25,10 @@ static void test_property_compress_roundtrip() { for (int iter = 0; iter < 10; iter++) { Data* original = random_data(1, 10000); EXPECT_NOT_NULL(original); - if (!original) - return; size_t orig_size = original->size; void* orig_copy = malloc(orig_size); EXPECT_NOT_NULL(orig_copy); - if (!orig_copy) { - data_destroy(original); - return; - } memcpy(orig_copy, original->data, orig_size); Data* compressed = data_compress(original, 3); diff --git a/tests/test_queue.c b/tests/test_queue.c index c518370..4c90153 100644 --- a/tests/test_queue.c +++ b/tests/test_queue.c @@ -119,8 +119,6 @@ static void test_queue_destroyer() { destroyer_calls = 0; Queue* q = queue_create(5, my_destroyer); EXPECT_NOT_NULL(q); - if (!q) - return; for (int i = 0; i < 3; i++) { int* val = malloc(sizeof(int)); diff --git a/tests/test_stress.c b/tests/test_stress.c index 0df0791..bf0e3f3 100644 --- a/tests/test_stress.c +++ b/tests/test_stress.c @@ -195,8 +195,6 @@ static void test_queue_rapid_create_destroy() { for (int i = 0; i < 100; i++) { Queue* q = queue_create(4, free); EXPECT_NOT_NULL(q); - if (!q) - return; for (int j = 0; j < 3; j++) { int* val = malloc(sizeof(int));