Browse Source

Tests fuer slot machine Gewinnberechnung

remotes/origin/stefan
fdai7472 11 months ago
parent
commit
582d5b2e4b
  1. 28
      src/test/c/Stefan/test_slot_machine.c

28
src/test/c/Stefan/test_slot_machine.c

@ -219,6 +219,34 @@ void test_3_B_3_C_3_D_won_bet_equals_10() {
//act //act
int actualResult = getWinnings(testSymbols, 10); int actualResult = getWinnings(testSymbols, 10);
//assert
TEST_ASSERT_EQUAL_INT(expectedResult, actualResult);
}
void test_3_A_3_C_3_D_won_bet_equals_10() {
//arrange
char testSymbols[] = {"AAACCCDDD"};
int expectedResult = 330;
//act
int actualResult = getWinnings(testSymbols, 10);
//assert
TEST_ASSERT_EQUAL_INT(expectedResult, actualResult);
}
void test_3_A_3_B_3_C_won_bet_equals_10() {
//arrange
char testSymbols[] = {"AAABBBCCC"};
int expectedResult = 180;
//act
int actualResult = getWinnings(testSymbols, 10);
//assert //assert
TEST_ASSERT_EQUAL_INT(expectedResult, actualResult); TEST_ASSERT_EQUAL_INT(expectedResult, actualResult);
} }
Loading…
Cancel
Save