Browse Source

weitere Tests: mehrere Asse korrekt berechnen

remotes/origin/stefan
fdai7472 11 months ago
parent
commit
d8e49a936c
  1. 28
      src/test/c/Stefan/test_blackjack.c

28
src/test/c/Stefan/test_blackjack.c

@ -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() { void test_blackjack_bet_equals_10() {
//arrange //arrange

Loading…
Cancel
Save