From 3da55a264a16ff3fb5ab6f5a80302ac7c12b98fa Mon Sep 17 00:00:00 2001 From: Mona Benkert Date: Tue, 4 Nov 2025 16:47:48 +0100 Subject: [PATCH] tests --- test/test_matmul.py | 24 ++++++++++++++++++++++++ test/test_rot.py | 4 ++++ 2 files changed, 28 insertions(+) create mode 100644 test/test_matmul.py create mode 100644 test/test_rot.py diff --git a/test/test_matmul.py b/test/test_matmul.py new file mode 100644 index 0000000..325dfff --- /dev/null +++ b/test/test_matmul.py @@ -0,0 +1,24 @@ +from matrixmania import matmul + +def test_matmul_1(): + a = [[4, 3, 2], + [1, 2, 3]] + + b = [[2], + [3], + [4]] + + assert matmul(a, b) == [[25], + [20]] + +def test_matmul_2(): + a = [[3, 4, -1, 4], + [-2, 2, 5, 1]] + + b = [[1, 3, -2], + [2, 5, 1], + [-1, 4, -4], + [2, 3, 6]] + + assert matmul(a, b) == [[20, 37, 26], + [-1, 27, -8]] diff --git a/test/test_rot.py b/test/test_rot.py new file mode 100644 index 0000000..4190ed3 --- /dev/null +++ b/test/test_rot.py @@ -0,0 +1,4 @@ +from matrixmania import rot_2D + +def test_rot_1(): + angle = \ No newline at end of file