|
@ -298,3 +298,33 @@ void test_subtract_bet_10_from_balance_100() { |
|
|
TEST_ASSERT_EQUAL_INT(expected_result, actual_result); |
|
|
TEST_ASSERT_EQUAL_INT(expected_result, actual_result); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_subtract_bet_100_from_balance_100() { |
|
|
|
|
|
|
|
|
|
|
|
//arrange |
|
|
|
|
|
int bet = 100; |
|
|
|
|
|
int balance = 100; |
|
|
|
|
|
int expected_result = 0; |
|
|
|
|
|
|
|
|
|
|
|
//act |
|
|
|
|
|
int actual_result = subtractBetFromBalanceBJ(bet, balance); |
|
|
|
|
|
|
|
|
|
|
|
//assert |
|
|
|
|
|
TEST_ASSERT_EQUAL_INT(expected_result, actual_result); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_subtract_bet_1_from_balance_100000() { |
|
|
|
|
|
|
|
|
|
|
|
//arrange |
|
|
|
|
|
int bet = 1; |
|
|
|
|
|
int balance = 100000; |
|
|
|
|
|
int expected_result = 99999; |
|
|
|
|
|
|
|
|
|
|
|
//act |
|
|
|
|
|
int actual_result = subtractBetFromBalanceBJ(bet, balance); |
|
|
|
|
|
|
|
|
|
|
|
//assert |
|
|
|
|
|
TEST_ASSERT_EQUAL_INT(expected_result, actual_result); |
|
|
|
|
|
|
|
|
|
|
|
} |