|
@ -40,4 +40,12 @@ void test_toLower() { |
|
|
result = toLower('?'); |
|
|
result = toLower('?'); |
|
|
printf("Actual Output: '%c'\n", result); |
|
|
printf("Actual Output: '%c'\n", result); |
|
|
assert(result == '?'); |
|
|
assert(result == '?'); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_initializeHangman() { |
|
|
|
|
|
char wordToGuess[] = "hangman"; |
|
|
|
|
|
char currentGuess[8]; |
|
|
|
|
|
initializeHangman(wordToGuess, currentGuess); |
|
|
|
|
|
assert(strcmp(currentGuess, "_______") == 0); |
|
|
|
|
|
printf("initializeHangman test passed!\n"); |
|
|
} |
|
|
} |