|
@ -15,8 +15,7 @@ void tearDown(void) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//Hier läuft der Test |
|
|
//Hier läuft der Test |
|
|
void test_runRaetselTest(void) |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
void test_runRaetselTest(void){ |
|
|
/* arrange */ |
|
|
/* arrange */ |
|
|
//Hier die Werte eingeben |
|
|
//Hier die Werte eingeben |
|
|
int result; |
|
|
int result; |
|
@ -33,4 +32,25 @@ void test_runRaetselTest(void) |
|
|
TEST_ASSERT_EQUAL_INT(1, result); |
|
|
TEST_ASSERT_EQUAL_INT(1, result); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_runRaetselTestFalsch(void){ |
|
|
|
|
|
|
|
|
|
|
|
int result; |
|
|
|
|
|
int input[] = {0,1,2,3}; |
|
|
|
|
|
int loesung = 4; |
|
|
|
|
|
|
|
|
|
|
|
userInput_ExpectAndReturn(5); |
|
|
|
|
|
result = zahlenraetsel(input, loesung); |
|
|
|
|
|
|
|
|
|
|
|
TEST_ASSERT_EQUAL_INT(0, result); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_runRaetselTestzwei(void){ |
|
|
|
|
|
|
|
|
|
|
|
userInput_ExpectAndReturn(198); |
|
|
|
|
|
int result = raetselaufruf(1); //hier wird rätsel 1 aufgerufen |
|
|
|
|
|
|
|
|
|
|
|
TEST_ASSERT_EQUAL_INT(1, result); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
#endif // TEST |
|
|
#endif // TEST |