No return on end of void functions.
This commit is contained in:
@@ -13,8 +13,6 @@ void test_initialize_card() {
|
||||
assert(card->face == NO_FACE);
|
||||
|
||||
free_card(card);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_duplicate_card() {
|
||||
@@ -27,8 +25,6 @@ void test_duplicate_card() {
|
||||
|
||||
assert(card_0 != card_1);
|
||||
assert(cards_equal(card_0, card_1));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_set_card() {
|
||||
@@ -47,8 +43,6 @@ void test_set_card() {
|
||||
assert(card->frame->start_x == start_x);
|
||||
|
||||
free_card(card);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_expose_card() {
|
||||
@@ -61,8 +55,6 @@ void test_expose_card() {
|
||||
assert(card->face == EXPOSED);
|
||||
|
||||
free_card(card);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_cover_card() {
|
||||
@@ -75,8 +67,6 @@ void test_cover_card() {
|
||||
assert(card->face == COVERED);
|
||||
|
||||
free_card(card);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_card() {
|
||||
@@ -85,6 +75,4 @@ void test_card() {
|
||||
test_set_card();
|
||||
test_expose_card();
|
||||
test_cover_card();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,4 @@
|
||||
|
||||
void test_cursor() {
|
||||
assert(true);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,4 @@
|
||||
|
||||
void test_deck() {
|
||||
assert(true);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,4 @@
|
||||
|
||||
void test_display() {
|
||||
assert(true);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -13,8 +13,6 @@ void test_initialize_frame() {
|
||||
assert(frame->start_x == 0);
|
||||
|
||||
free_frame(frame);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_duplicate_frame() {
|
||||
@@ -27,8 +25,6 @@ void test_duplicate_frame() {
|
||||
|
||||
assert(frame_0 != frame_1);
|
||||
assert(frames_equal(frame_0, frame_1));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_set_frame() {
|
||||
@@ -44,14 +40,10 @@ void test_set_frame() {
|
||||
assert(frame->start_x == start_x);
|
||||
|
||||
free_frame(frame);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_frame() {
|
||||
test_initialize_frame();
|
||||
test_duplicate_frame();
|
||||
test_set_frame();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -25,8 +25,6 @@ void test_move_card_from_empty_stack_to_empty_stack() {
|
||||
|
||||
free_stack(origin);
|
||||
free_stack(destination);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_move_card_from_empty_stack_to_non_empty_stack() {
|
||||
@@ -57,8 +55,6 @@ void test_move_card_from_empty_stack_to_non_empty_stack() {
|
||||
|
||||
free_stack(origin);
|
||||
free_stack(destination);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_move_card_from_non_empty_stack_to_empty_stack() {
|
||||
@@ -82,8 +78,6 @@ void test_move_card_from_non_empty_stack_to_empty_stack() {
|
||||
|
||||
free_stack(origin);
|
||||
free_stack(destination);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_move_card_from_non_empty_stack_to_non_empty_stack() {
|
||||
@@ -112,8 +106,6 @@ void test_move_card_from_non_empty_stack_to_non_empty_stack() {
|
||||
|
||||
free_stack(origin);
|
||||
free_stack(destination);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_valid_move_from_stock_to_stock() {
|
||||
@@ -521,6 +513,4 @@ void test_game() {
|
||||
test_move_card_from_empty_stack_to_non_empty_stack();
|
||||
test_move_card_from_non_empty_stack_to_empty_stack();
|
||||
test_move_card_from_non_empty_stack_to_non_empty_stack();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,4 @@
|
||||
|
||||
void test_keyboard() {
|
||||
assert(true);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -12,8 +12,6 @@ void test_initialize_stack() {
|
||||
assert(!stack->next);
|
||||
|
||||
free_stack(stack);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_duplicate_stack() {
|
||||
@@ -32,8 +30,6 @@ void test_duplicate_stack() {
|
||||
|
||||
assert(stack_0 != stack_1);
|
||||
assert(stacks_equal(stack_0, stack_1));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_empty_on_empty_stack() {
|
||||
@@ -45,8 +41,6 @@ void test_empty_on_empty_stack() {
|
||||
assert(empty(stack));
|
||||
|
||||
free_stack(stack);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_empty_on_non_empty_stack() {
|
||||
@@ -64,8 +58,6 @@ void test_empty_on_non_empty_stack() {
|
||||
assert(!empty(stack));
|
||||
|
||||
free_stack(stack);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_length() {
|
||||
@@ -86,8 +78,6 @@ void test_length() {
|
||||
}
|
||||
|
||||
free_stack(stack);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_push_on_empty_stack() {
|
||||
@@ -106,8 +96,6 @@ void test_push_on_empty_stack() {
|
||||
assert(!stack->next);
|
||||
|
||||
free_stack(stack);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_push_on_non_empty_stack() {
|
||||
@@ -131,8 +119,6 @@ void test_push_on_non_empty_stack() {
|
||||
assert(!stack->next->next);
|
||||
|
||||
free_stack(stack);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_push_null_on_empty_stack() {
|
||||
@@ -147,8 +133,6 @@ void test_push_null_on_empty_stack() {
|
||||
assert(!stack->next);
|
||||
|
||||
free_stack(stack);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_push_null_on_non_empty_stack() {
|
||||
@@ -168,8 +152,6 @@ void test_push_null_on_non_empty_stack() {
|
||||
assert(stacks_equal(stack->next, old_stack->next));
|
||||
|
||||
free_stack(stack);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_pop_on_empty_stack() {
|
||||
@@ -185,8 +167,6 @@ void test_pop_on_empty_stack() {
|
||||
assert(!popped_entry);
|
||||
|
||||
free_stack(stack);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_pop_on_stack_with_one_element() {
|
||||
@@ -207,8 +187,6 @@ void test_pop_on_stack_with_one_element() {
|
||||
assert(!popped_entry->next);
|
||||
|
||||
free_stack(stack);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_pop_on_stack_with_more_than_one_element() {
|
||||
@@ -232,8 +210,6 @@ void test_pop_on_stack_with_more_than_one_element() {
|
||||
assert(!popped_entry->next);
|
||||
|
||||
free_stack(stack);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_reverse_on_empty_stack() {
|
||||
@@ -339,6 +315,4 @@ void test_stack() {
|
||||
test_reverse_on_stack_with_one_element();
|
||||
test_reverse_on_stack_with_more_than_one_element();
|
||||
test_reverse_should_not_change_stack();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
|
||||
void test_frames_equal_with_two_nulls() {
|
||||
assert(frames_equal(NULL, NULL));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_frames_equal_with_one_null() {
|
||||
@@ -13,8 +11,6 @@ void test_frames_equal_with_one_null() {
|
||||
allocate_frame(&frame);
|
||||
assert(!frames_equal(frame, NULL));
|
||||
assert(!frames_equal(NULL, frame));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_frames_equal_with_two_equivalent_frames() {
|
||||
@@ -27,8 +23,6 @@ void test_frames_equal_with_two_equivalent_frames() {
|
||||
set_frame(frame_1, start_y, start_x);
|
||||
|
||||
assert(frames_equal(frame_0, frame_1));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_frames_equal_with_two_frame_pointers_to_the_same_address() {
|
||||
@@ -37,14 +31,10 @@ void test_frames_equal_with_two_frame_pointers_to_the_same_address() {
|
||||
allocate_frame(&frame);
|
||||
|
||||
assert(frames_equal(frame, frame));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_cards_equal_with_two_nulls() {
|
||||
assert(cards_equal(NULL, NULL));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_cards_equal_with_one_null() {
|
||||
@@ -53,8 +43,6 @@ void test_cards_equal_with_one_null() {
|
||||
allocate_card(&card);
|
||||
assert(!cards_equal(card, NULL));
|
||||
assert(!cards_equal(NULL, card));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_cards_equal_with_two_equivalent_cards() {
|
||||
@@ -67,8 +55,6 @@ void test_cards_equal_with_two_equivalent_cards() {
|
||||
set_card(card_1, ACE, SPADES, EXPOSED, start_y, start_x);
|
||||
|
||||
assert(cards_equal(card_0, card_1));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_cards_equal_with_two_card_pointers_to_the_same_address() {
|
||||
@@ -77,14 +63,10 @@ void test_cards_equal_with_two_card_pointers_to_the_same_address() {
|
||||
allocate_card(&card);
|
||||
|
||||
assert(cards_equal(card, card));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_stacks_equal_with_two_nulls() {
|
||||
assert(stacks_equal(NULL, NULL));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_stacks_equal_with_one_null() {
|
||||
@@ -93,8 +75,6 @@ void test_stacks_equal_with_one_null() {
|
||||
allocate_stack(&stack);
|
||||
assert(!stacks_equal(stack, NULL));
|
||||
assert(!stacks_equal(NULL, stack));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_stacks_equal_with_two_equivalent_stacks() {
|
||||
@@ -112,8 +92,6 @@ void test_stacks_equal_with_two_equivalent_stacks() {
|
||||
push(&stack_1, card_1);
|
||||
|
||||
assert(stacks_equal(stack_0, stack_1));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_stacks_equal_with_two_different_stacks() {
|
||||
@@ -131,8 +109,6 @@ void test_stacks_equal_with_two_different_stacks() {
|
||||
push(&stack_1, card_1);
|
||||
|
||||
assert(!stacks_equal(stack_0, stack_1));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_stacks_equal_with_two_stack_pointers_to_the_same_address() {
|
||||
@@ -141,8 +117,6 @@ void test_stacks_equal_with_two_stack_pointers_to_the_same_address() {
|
||||
allocate_stack(&stack);
|
||||
|
||||
assert(stacks_equal(stack, stack));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void test_test_helper() {
|
||||
@@ -160,6 +134,4 @@ void test_test_helper() {
|
||||
test_stacks_equal_with_two_equivalent_stacks();
|
||||
test_stacks_equal_with_two_different_stacks();
|
||||
test_stacks_equal_with_two_stack_pointers_to_the_same_address();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,4 @@
|
||||
|
||||
void test_util() {
|
||||
assert(true);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user