# Exam 1 tests - Problem 3 (5 of 20 points)

try:
    from iotest import run_assignment_tests
except ImportError:
    print("❌ Error: Could not find the 'iotest' module.")
    print("Please make sure 'iotest.py' is in the same directory as this test file and your solution program.")
    exit(1)

test_cases = [
    {"args": ["3", "2", "2"], 
     "expected_output": '''* 0 0
0 * 0
0 0 *'''
    },
    {"args": ["3", "2", "1"], 
     "expected_output": '''* 0 0
* * 0
0 0 *'''
    },
    {"args": ["5", "1", "5"], 
     "expected_output": '''* 0 0 0 *
0 * 0 0 0
0 0 * 0 0
0 0 0 * 0
0 0 0 0 *'''
    },
    {"args": ["2", "2", "1"], 
     "expected_output": '''* 0
* *'''
    },
    {"args": ["1", "1", "1"], 
     "expected_output": '''*'''
    },
    {"args": ["8", "3", "6"], 
     "expected_output": '''* 0 0 0 0 0 0 0
0 * 0 0 0 0 0 0
0 0 * 0 0 * 0 0
0 0 0 * 0 0 0 0
0 0 0 0 * 0 0 0
0 0 0 0 0 * 0 0
0 0 0 0 0 0 * 0
0 0 0 0 0 0 0 *'''
    },
]

if __name__ == "__main__":
    run_assignment_tests("p3.py", test_cases)
