Browse Source

Test fuer generiertes ASCII art der Karte 10/J/Q/K

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

21
src/test/c/Stefan/test_blackjack.c

@ -1,5 +1,6 @@
#include "blackjack.h"
#include "unity.h"
#include <stdbool.h>
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

Loading…
Cancel
Save