tests
This commit is contained in:
parent
cc56ea68de
commit
3da55a264a
24
test/test_matmul.py
Normal file
24
test/test_matmul.py
Normal file
@ -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]]
|
||||
4
test/test_rot.py
Normal file
4
test/test_rot.py
Normal file
@ -0,0 +1,4 @@
|
||||
from matrixmania import rot_2D
|
||||
|
||||
def test_rot_1():
|
||||
angle =
|
||||
Loading…
x
Reference in New Issue
Block a user