Permalink
Browse files

Updated matrix and vector multiplication tests

  • Loading branch information...
1 parent a13b900 commit 8766b955ecbf58effe4acb41ae244e1a0ee04360 @kintel kintel committed Mar 31, 2012
Showing with 5 additions and 5 deletions.
  1. +3 −3 testdata/scad/misc/vector-values.scad
  2. +2 −2 tests/regression/echotest/vector-values-expected.txt
@@ -8,16 +8,16 @@ echo(str("Testing vector dot product: ",c1));
d1=[1,0];
echo(str(" Bounds check: ",a1*d1));
-m2=[[0,1],[1,0]];
+m2=[[0,1],[1,0],[2,3]];
v2=[2,3];
p2=m2*v2;
echo(str("Testing matrix * vector: ",p2));
d2=[0,0,1];
echo(str(" Bounds check: ",m2*d2));
-m3=[[1,-1,1],[1,0,-1]];
-v3=[1,1];
+m3=[[1,-1],[1,0],[2,3]];
+v3=[1,2,3];
p3=v3*m3;
echo(str("Testing vector * matrix: ",p3));
@@ -1,8 +1,8 @@
ECHO: "Testing vector dot product: 14"
ECHO: " Bounds check: undef"
-ECHO: "Testing matrix * vector: [3, 2]"
+ECHO: "Testing matrix * vector: [3, 2, 13]"
ECHO: " Bounds check: undef"
-ECHO: "Testing vector * matrix: [2, -1, 0]"
+ECHO: "Testing vector * matrix: [9, 8]"
ECHO: " Bounds check: undef"
ECHO: "Testing id matrix * id matrix: [[1, 0], [0, 1]]"
ECHO: "Testing asymmetric matrix * matrix: [[2, 1], [-1, 0]]"

0 comments on commit 8766b95

Please sign in to comment.