From b4331381c018243325f5b72b918b283f594a958c Mon Sep 17 00:00:00 2001 From: Peter Wiebe Date: Wed, 7 Feb 2024 10:29:44 +0100 Subject: [PATCH] test_erratene_buchstaben_hinzufuegen 1 --- src/test/c/test_hangman_test.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/test/c/test_hangman_test.c b/src/test/c/test_hangman_test.c index a092ee3..c8fe86b 100644 --- a/src/test/c/test_hangman_test.c +++ b/src/test/c/test_hangman_test.c @@ -63,4 +63,17 @@ void test_buchstabe_im_zu_erratenden_wort_eingabe_j_in_eoj_richtig() { TEST_ASSERT_EQUAL_INT(expected, actual); } +void test_erratene_buchstaben_hinzufuegen_anhaengen_r_an_leerstring_zu_peter_richtig() { + // arrange + char expected[100] = "r"; + char actual[100] = ""; + char to_add = 'r'; + + // act + erratene_buchstaben_hinzufuegen(actual, to_add); + + // assert + TEST_ASSERT_EQUAL_STRING(expected, actual); +} + #endif // TEST