From fced68bd07fb41d431a6f6ef9115d816b1fa660f Mon Sep 17 00:00:00 2001 From: fdai7472 Date: Wed, 7 Feb 2024 12:03:14 +0100 Subject: [PATCH] Test fuer generiertes ASCII art der Karte 10/J/Q/K --- src/test/c/Stefan/test_blackjack.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/test/c/Stefan/test_blackjack.c b/src/test/c/Stefan/test_blackjack.c index 731db6e..a106eed 100644 --- a/src/test/c/Stefan/test_blackjack.c +++ b/src/test/c/Stefan/test_blackjack.c @@ -1,5 +1,6 @@ #include "blackjack.h" #include "unity.h" +#include void setUp() {} @@ -298,6 +299,26 @@ void test_generate_char_for_card_5() { } +void test_generate_char_for_card_10() { + + //arrange + int cardValue = 10; + + //act + bool result = false; + switch(generateCardAscii(cardValue)){ + case('1'): result = true; break; + case('J'): result = true; break; + case('Q'): result = true; break; + case('K'): result = true; break; + default: result = false; break; + } + + //assert + TEST_ASSERT_TRUE(result); + +} + void test_subtract_bet_10_from_balance_100() { //arrange