|
@ -10,20 +10,20 @@ char* GlobalOrderError; |
|
|
/*=======External Functions This Runner Calls=====*/ |
|
|
/*=======External Functions This Runner Calls=====*/ |
|
|
extern void setUp(void); |
|
|
extern void setUp(void); |
|
|
extern void tearDown(void); |
|
|
extern void tearDown(void); |
|
|
extern void test_coinflip_player_x_starts(void); |
|
|
|
|
|
extern void test_coinflip_player_o_starts(void); |
|
|
|
|
|
|
|
|
extern void test_coinflip_x_starts(void); |
|
|
|
|
|
extern void test_coinflip_o_starts(void); |
|
|
extern void test_vertical_win(void); |
|
|
extern void test_vertical_win(void); |
|
|
extern void test_horizontal_win(void); |
|
|
extern void test_horizontal_win(void); |
|
|
extern void test_diagonal_win(void); |
|
|
extern void test_diagonal_win(void); |
|
|
extern void test_valid_move_and_switch_player(void); |
|
|
|
|
|
|
|
|
extern void test_valid_move_and_switch(void); |
|
|
extern void test_invalid_input(void); |
|
|
extern void test_invalid_input(void); |
|
|
extern void test_valid_input(void); |
|
|
extern void test_valid_input(void); |
|
|
extern void test_invalid_input_type1(void); |
|
|
|
|
|
extern void test_invalid_input_type2(void); |
|
|
|
|
|
extern void test_getNumberOfMoves_returns_correct_number_of_moves(void); |
|
|
|
|
|
|
|
|
extern void test_invalid_input_negative_row(void); |
|
|
|
|
|
extern void test_invalid_input_overflow_column(void); |
|
|
|
|
|
extern void test_NumberOfMoves_returns_correct_number_of_moves(void); |
|
|
extern void test_BoardFull_returns_false_when_board_is_not_full(void); |
|
|
extern void test_BoardFull_returns_false_when_board_is_not_full(void); |
|
|
extern void test_BoardFull_returns_true_when_board_is_full(void); |
|
|
extern void test_BoardFull_returns_true_when_board_is_full(void); |
|
|
extern void test_getCurrentPlayer_returns_correct_player(void); |
|
|
|
|
|
|
|
|
extern void test_CurrentPlayer_returns_correct_player(void); |
|
|
extern void test_FieldEmpty_returns_true_for_empty_field(void); |
|
|
extern void test_FieldEmpty_returns_true_for_empty_field(void); |
|
|
extern void test_FieldEmpty_returns_false_for_nonempty_field(void); |
|
|
extern void test_FieldEmpty_returns_false_for_nonempty_field(void); |
|
|
|
|
|
|
|
@ -90,20 +90,20 @@ static void run_test(UnityTestFunction func, const char* name, UNITY_LINE_TYPE l |
|
|
int main(void) |
|
|
int main(void) |
|
|
{ |
|
|
{ |
|
|
UnityBegin("test_duellist_spielesammlung_projekt.c"); |
|
|
UnityBegin("test_duellist_spielesammlung_projekt.c"); |
|
|
run_test(test_coinflip_player_x_starts, "test_coinflip_player_x_starts", 11); |
|
|
|
|
|
run_test(test_coinflip_player_o_starts, "test_coinflip_player_o_starts", 23); |
|
|
|
|
|
|
|
|
run_test(test_coinflip_x_starts, "test_coinflip_x_starts", 11); |
|
|
|
|
|
run_test(test_coinflip_o_starts, "test_coinflip_o_starts", 23); |
|
|
run_test(test_vertical_win, "test_vertical_win", 35); |
|
|
run_test(test_vertical_win, "test_vertical_win", 35); |
|
|
run_test(test_horizontal_win, "test_horizontal_win", 49); |
|
|
run_test(test_horizontal_win, "test_horizontal_win", 49); |
|
|
run_test(test_diagonal_win, "test_diagonal_win", 62); |
|
|
run_test(test_diagonal_win, "test_diagonal_win", 62); |
|
|
run_test(test_valid_move_and_switch_player, "test_valid_move_and_switch_player", 76); |
|
|
|
|
|
|
|
|
run_test(test_valid_move_and_switch, "test_valid_move_and_switch", 76); |
|
|
run_test(test_invalid_input, "test_invalid_input", 92); |
|
|
run_test(test_invalid_input, "test_invalid_input", 92); |
|
|
run_test(test_valid_input, "test_valid_input", 106); |
|
|
run_test(test_valid_input, "test_valid_input", 106); |
|
|
run_test(test_invalid_input_type1, "test_invalid_input_type1", 121); |
|
|
|
|
|
run_test(test_invalid_input_type2, "test_invalid_input_type2", 135); |
|
|
|
|
|
run_test(test_getNumberOfMoves_returns_correct_number_of_moves, "test_getNumberOfMoves_returns_correct_number_of_moves", 149); |
|
|
|
|
|
|
|
|
run_test(test_invalid_input_negative_row, "test_invalid_input_negative_row", 121); |
|
|
|
|
|
run_test(test_invalid_input_overflow_column, "test_invalid_input_overflow_column", 135); |
|
|
|
|
|
run_test(test_NumberOfMoves_returns_correct_number_of_moves, "test_NumberOfMoves_returns_correct_number_of_moves", 149); |
|
|
run_test(test_BoardFull_returns_false_when_board_is_not_full, "test_BoardFull_returns_false_when_board_is_not_full", 163); |
|
|
run_test(test_BoardFull_returns_false_when_board_is_not_full, "test_BoardFull_returns_false_when_board_is_not_full", 163); |
|
|
run_test(test_BoardFull_returns_true_when_board_is_full, "test_BoardFull_returns_true_when_board_is_full", 176); |
|
|
run_test(test_BoardFull_returns_true_when_board_is_full, "test_BoardFull_returns_true_when_board_is_full", 176); |
|
|
run_test(test_getCurrentPlayer_returns_correct_player, "test_getCurrentPlayer_returns_correct_player", 189); |
|
|
|
|
|
|
|
|
run_test(test_CurrentPlayer_returns_correct_player, "test_CurrentPlayer_returns_correct_player", 189); |
|
|
run_test(test_FieldEmpty_returns_true_for_empty_field, "test_FieldEmpty_returns_true_for_empty_field", 202); |
|
|
run_test(test_FieldEmpty_returns_true_for_empty_field, "test_FieldEmpty_returns_true_for_empty_field", 202); |
|
|
run_test(test_FieldEmpty_returns_false_for_nonempty_field, "test_FieldEmpty_returns_false_for_nonempty_field", 215); |
|
|
run_test(test_FieldEmpty_returns_false_for_nonempty_field, "test_FieldEmpty_returns_false_for_nonempty_field", 215); |
|
|
|
|
|
|
|
|