Browse Source

test_erratene_buchstaben_hinzufuegen 2

remotes/origin/peter^2
Peter Wiebe 11 months ago
parent
commit
84daac09ab
  1. 13
      src/test/c/test_hangman_test.c

13
src/test/c/test_hangman_test.c

@ -76,4 +76,17 @@ void test_erratenen_buchstaben_hinzufuegen_anhaengen_r_an_leerstring_zu_peter_ri
TEST_ASSERT_EQUAL_STRING(expected, actual); TEST_ASSERT_EQUAL_STRING(expected, actual);
} }
void test_erratenen_buchstaben_hinzufuegen_anhaengen_r_an_pete_zu_peter_richtig() {
// arrange
char expected[100] = "peter";
char actual[100] = "pete";
char to_add = 'r';
// act
erratenen_buchstaben_hinzufuegen(actual, to_add);
// assert
TEST_ASSERT_EQUAL_STRING(expected, actual);
}
#endif // TEST #endif // TEST
Loading…
Cancel
Save