You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
654 B
35 lines
654 B
#ifdef TEST
|
|
|
|
#include "unity.h"
|
|
|
|
#include "WortSpiel.h"
|
|
|
|
void setUp(void)
|
|
{
|
|
}
|
|
|
|
void tearDown(void)
|
|
{
|
|
}
|
|
|
|
void testLoescheBuchstaben_Buchstabeexistiert(void) {
|
|
// Testfall 1: Buchstabe existiert im Wort
|
|
char wort1[] = "Beispiel";
|
|
loescheBuchstaben(wort1, 'i');
|
|
TEST_ASSERT_EQUAL_STRING("Bespel", wort1);
|
|
}
|
|
|
|
void testLoescheBuchstaben_Buchstabeexistiertnicht(void) {
|
|
char wort2[] = "Test";
|
|
loescheBuchstaben(wort2, 'z');
|
|
TEST_ASSERT_EQUAL_STRING("Test", wort2);
|
|
}
|
|
|
|
void testLoescheBuchstaben_Leereswort(void) {
|
|
char wort3[] = "";
|
|
loescheBuchstaben(wort3, 'a');
|
|
TEST_ASSERT_EQUAL_STRING("", wort3);
|
|
}
|
|
|
|
|
|
#endif // TEST
|