|
@ -187,7 +187,7 @@ void test_rockPaperScissors_validPlayerInput(void) |
|
|
/* arrange */ |
|
|
/* arrange */ |
|
|
//Hier die Werte eingeben |
|
|
//Hier die Werte eingeben |
|
|
bool result; |
|
|
bool result; |
|
|
int playerInput = 1; |
|
|
|
|
|
|
|
|
int playerInput = 2; |
|
|
|
|
|
|
|
|
/* act */ |
|
|
/* act */ |
|
|
//Die Funktion wird ausgeführt |
|
|
//Die Funktion wird ausgeführt |
|
@ -198,6 +198,22 @@ void test_rockPaperScissors_validPlayerInput(void) |
|
|
TEST_ASSERT_EQUAL_INT(true, result); |
|
|
TEST_ASSERT_EQUAL_INT(true, result); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_rockPaperScissors_invalidPlayerInput(void) |
|
|
|
|
|
{ |
|
|
|
|
|
/* arrange */ |
|
|
|
|
|
//Hier die Werte eingeben |
|
|
|
|
|
bool result; |
|
|
|
|
|
int playerInput = 5; |
|
|
|
|
|
|
|
|
|
|
|
/* act */ |
|
|
|
|
|
//Die Funktion wird ausgeführt |
|
|
|
|
|
result = validatePlayerInput(playerInput); |
|
|
|
|
|
|
|
|
|
|
|
/* assert */ |
|
|
|
|
|
//Vergleichen |
|
|
|
|
|
TEST_ASSERT_EQUAL_INT(false, result); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
#endif // TEST |
|
|
#endif // TEST |
|
|
|
|
|
|
|
|
/*Testcases: |
|
|
/*Testcases: |
|
|