|
|
@ -0,0 +1,23 @@ |
|
|
|
#include <stdio.h> |
|
|
|
#include "playHangman.h" |
|
|
|
|
|
|
|
|
|
|
|
void test_displayRules() { |
|
|
|
printf("Test Case 1: User inputs '1'\n"); |
|
|
|
printf("Expected Output: 'Let's get started!'\n"); |
|
|
|
printf("Actual Output: "); |
|
|
|
printf("1\n"); |
|
|
|
displayRules(); |
|
|
|
|
|
|
|
printf("\nTest Case 2: User inputs '2'\n"); |
|
|
|
printf("Expected Output: Output of printRules() function\n"); |
|
|
|
printf("Actual Output: "); |
|
|
|
printf("2\n"); |
|
|
|
displayRules(); |
|
|
|
|
|
|
|
printf("\nTest Case 3: User inputs invalid value\n"); |
|
|
|
printf("Expected Output: 'Please enter either 1 or 2 to continue'\n"); |
|
|
|
printf("Actual Output: "); |
|
|
|
printf("invalid\n"); |
|
|
|
displayRules(); |
|
|
|
} |