|
@ -16,6 +16,7 @@ void test_subtract_bet_10_from_balance_10() { |
|
|
//assert |
|
|
//assert |
|
|
TEST_ASSERT_EQUAL_INT(expectedResult, actualResult); |
|
|
TEST_ASSERT_EQUAL_INT(expectedResult, actualResult); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void test_subtract_bet_0_from_balance_10() { |
|
|
void test_subtract_bet_0_from_balance_10() { |
|
|
|
|
|
|
|
|
//arrange |
|
|
//arrange |
|
@ -109,3 +110,87 @@ void test_3_D_won_bet_equals_10() { |
|
|
//assert |
|
|
//assert |
|
|
TEST_ASSERT_EQUAL_INT(expectedResult, actualResult); |
|
|
TEST_ASSERT_EQUAL_INT(expectedResult, actualResult); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_6_A_won_bet_equals_10() { |
|
|
|
|
|
|
|
|
|
|
|
//arrange |
|
|
|
|
|
char testSymbols[] = {"AAAAAACAC"}; |
|
|
|
|
|
|
|
|
|
|
|
int expectedResult = 60; |
|
|
|
|
|
|
|
|
|
|
|
//act |
|
|
|
|
|
int actualResult = getWinnings(testSymbols, 10); |
|
|
|
|
|
|
|
|
|
|
|
//assert |
|
|
|
|
|
TEST_ASSERT_EQUAL_INT(expectedResult, actualResult); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_6_B_won_bet_equals_10() { |
|
|
|
|
|
|
|
|
|
|
|
//arrange |
|
|
|
|
|
char testSymbols[] = {"BBBBBBCAC"}; |
|
|
|
|
|
|
|
|
|
|
|
int expectedResult = 100; |
|
|
|
|
|
|
|
|
|
|
|
//act |
|
|
|
|
|
int actualResult = getWinnings(testSymbols, 10); |
|
|
|
|
|
|
|
|
|
|
|
//assert |
|
|
|
|
|
TEST_ASSERT_EQUAL_INT(expectedResult, actualResult); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_6_C_won_bet_equals_10() { |
|
|
|
|
|
|
|
|
|
|
|
//arrange |
|
|
|
|
|
char testSymbols[] = {"CCCCCCCAC"}; |
|
|
|
|
|
|
|
|
|
|
|
int expectedResult = 200; |
|
|
|
|
|
|
|
|
|
|
|
//act |
|
|
|
|
|
int actualResult = getWinnings(testSymbols, 10); |
|
|
|
|
|
|
|
|
|
|
|
//assert |
|
|
|
|
|
TEST_ASSERT_EQUAL_INT(expectedResult, actualResult); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_6_D_won_bet_equals_10() { |
|
|
|
|
|
|
|
|
|
|
|
//arrange |
|
|
|
|
|
char testSymbols[] = {"DDDDDDCAC"}; |
|
|
|
|
|
|
|
|
|
|
|
int expectedResult = 400; |
|
|
|
|
|
|
|
|
|
|
|
//act |
|
|
|
|
|
int actualResult = getWinnings(testSymbols, 10); |
|
|
|
|
|
|
|
|
|
|
|
//assert |
|
|
|
|
|
TEST_ASSERT_EQUAL_INT(expectedResult, actualResult); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_3_A_3_B_won_bet_equals_10() { |
|
|
|
|
|
|
|
|
|
|
|
//arrange |
|
|
|
|
|
char testSymbols[] = {"AAABBBCAC"}; |
|
|
|
|
|
|
|
|
|
|
|
int expectedResult = 80; |
|
|
|
|
|
|
|
|
|
|
|
//act |
|
|
|
|
|
int actualResult = getWinnings(testSymbols, 10); |
|
|
|
|
|
|
|
|
|
|
|
//assert |
|
|
|
|
|
TEST_ASSERT_EQUAL_INT(expectedResult, actualResult); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_3_C_3_D_won_bet_equals_10() { |
|
|
|
|
|
|
|
|
|
|
|
//arrange |
|
|
|
|
|
char testSymbols[] = {"BAACCCDDD"}; |
|
|
|
|
|
|
|
|
|
|
|
int expectedResult = 300; |
|
|
|
|
|
|
|
|
|
|
|
//act |
|
|
|
|
|
int actualResult = getWinnings(testSymbols, 10); |
|
|
|
|
|
|
|
|
|
|
|
//assert |
|
|
|
|
|
TEST_ASSERT_EQUAL_INT(expectedResult, actualResult); |
|
|
|
|
|
} |