From 994e9f666b70e5662891004fbd345a264351cc62 Mon Sep 17 00:00:00 2001 From: Saba Fazlali Date: Wed, 7 Feb 2024 01:47:31 +0100 Subject: [PATCH] test initializeHangman --- test/Hangman/test_playHangman.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/Hangman/test_playHangman.c b/test/Hangman/test_playHangman.c index cfc47b0..3f7ba5a 100644 --- a/test/Hangman/test_playHangman.c +++ b/test/Hangman/test_playHangman.c @@ -40,4 +40,12 @@ void test_toLower() { result = toLower('?'); printf("Actual Output: '%c'\n", result); assert(result == '?'); +} + +void test_initializeHangman() { + char wordToGuess[] = "hangman"; + char currentGuess[8]; + initializeHangman(wordToGuess, currentGuess); + assert(strcmp(currentGuess, "_______") == 0); + printf("initializeHangman test passed!\n"); } \ No newline at end of file