|
|
@ -144,6 +144,34 @@ void test_cards_ace_ace_10_8_total_equals_20() { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
void test_cards_ace_ace_10_9_total_equals_21() { |
|
|
|
|
|
|
|
//arrange |
|
|
|
int userCards[] = { 11, 11, 10, 9}; |
|
|
|
int expected_result = 21; |
|
|
|
|
|
|
|
//act |
|
|
|
int actual_result = calculateCardsTotal(userCards, 4); |
|
|
|
|
|
|
|
//assert |
|
|
|
TEST_ASSERT_EQUAL_INT(expected_result, actual_result); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
void test_cards_ace_ace_ace_10_total_equals_21() { |
|
|
|
|
|
|
|
//arrange |
|
|
|
int userCards[] = { 11, 11, 11, 10}; |
|
|
|
int expected_result = 13; |
|
|
|
|
|
|
|
//act |
|
|
|
int actual_result = calculateCardsTotal(userCards, 4); |
|
|
|
|
|
|
|
//assert |
|
|
|
TEST_ASSERT_EQUAL_INT(expected_result, actual_result); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
void test_blackjack_bet_equals_10() { |
|
|
|
|
|
|
|
//arrange |
|
|
|