From d8e49a936c5ac03abba30f0bb0a83cea6753a200 Mon Sep 17 00:00:00 2001 From: fdai7472 Date: Wed, 7 Feb 2024 10:24:00 +0100 Subject: [PATCH] weitere Tests: mehrere Asse korrekt berechnen --- src/test/c/Stefan/test_blackjack.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/test/c/Stefan/test_blackjack.c b/src/test/c/Stefan/test_blackjack.c index bd10d9e..feab3b0 100644 --- a/src/test/c/Stefan/test_blackjack.c +++ b/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() { //arrange