@ -1,21 +0,0 @@
#include "test_drawHangman.h"
void test_drawHangman(int mistakes){
switch (mistakes) {
case 0:
drawHangman(0);
case 1:
drawHangman(1);
case 2:
drawHangman(2);
case 3:
drawHangman(3);
case 4:
drawHangman(4);
case 5:
drawHangman(5);
case 6:
drawHangman(6);
case 10: // More than 6 mistakes
drawHangman(10);
}
@ -0,0 +1,12 @@
#include <stdio.h>
#include <assert.h>
#include "drawHangman.h"
#include "playHangman.h"
void test_drawHangman() {
// Test each case of incorrectGuesses
printf("Testing drawHangman(0):\n");
printf("\n");
@ -2,7 +2,6 @@
#include <string.h>
// Custom assert function to compare expected and actual values
void assert_equal(const char *test_name, const char *expected, const char *actual) {
if (strcmp(expected, actual) == 0) {