|
|
@ -22,6 +22,48 @@ void test_berechnung_2_convertsToDigit(void) |
|
|
|
result = convert(2); |
|
|
|
|
|
|
|
/* assert */ |
|
|
|
TEST_ASSERT_EQUAL_STRING (expected, result); |
|
|
|
} |
|
|
|
|
|
|
|
void test_berechnung_11_convertsToDigits(void) |
|
|
|
{ |
|
|
|
char* result; |
|
|
|
char expected[] = "11\n"; |
|
|
|
|
|
|
|
result = convert(11); |
|
|
|
|
|
|
|
TEST_ASSERT_EQUAL_STRING (expected, result); |
|
|
|
} |
|
|
|
|
|
|
|
void test_berechnung_10_convertsTo_buzz(void) |
|
|
|
{ |
|
|
|
char* result; |
|
|
|
char expected[] = "buzz\n"; |
|
|
|
|
|
|
|
result = convert(10); |
|
|
|
|
|
|
|
TEST_ASSERT_EQUAL_STRING (expected, result); |
|
|
|
} |
|
|
|
|
|
|
|
void test_berechnung_20_30_is_10(void) |
|
|
|
{ |
|
|
|
int result; |
|
|
|
int expected = 10; |
|
|
|
|
|
|
|
result = gcd(20, 30); |
|
|
|
|
|
|
|
TEST_ASSERT_EQUAL_INT (expected, result); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_berechnung_20_30_is_11_fails(void) |
|
|
|
{ |
|
|
|
int result; |
|
|
|
int expected = 11; |
|
|
|
|
|
|
|
result = gcd(20, 30); |
|
|
|
|
|
|
|
TEST_ASSERT_EQUAL_INT (expected, result); |
|
|
|
} |
|
|
|
|
|
|
|
#endif // TEST |