Skip to content

Commit 4acddbb

Browse files
authored
Test coverage: DreamObjectMatrix (#2380)
1 parent 1626192 commit 4acddbb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Content.Tests/DMProject/Tests/Builtins/Matrix/MatrixMultiply.dm

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,15 @@
2020
M.Multiply("a")
2121
if(M ~! matrix(0, 0, 0, 0, 0, 0))
2222
CRASH("Unexpected matrix/Multiply(\"a\") result: [json_encode(M)]")
23+
24+
M = matrix()
25+
M *= 2
26+
if(M ~! matrix(2, 0, 0, 0, 2, 0))
27+
CRASH("Unexpected matrix *= 2 result: [json_encode(M)]")
28+
29+
M /= 2
30+
if(M ~! matrix(1, 0, 0, 0, 1, 0))
31+
CRASH("Unexpected matrix /= 2 result: [json_encode(M)]")
32+
33+
N = new /matrix(M)
34+
ASSERT(M ~= N && M != N)

0 commit comments

Comments
 (0)