Fix testing mechanism.

This commit is contained in:
James Goppert
2016-01-24 12:00:34 +11:00
parent 6009709986
commit 38211e1aff
17 changed files with 179 additions and 173 deletions
+4 -8
View File
@@ -1,7 +1,7 @@
#include <assert.h>
#include <stdio.h>
#include <matrix/math.hpp>
#include "test_macros.hpp"
using namespace matrix;
@@ -13,22 +13,18 @@ int main()
Matrix3f A_I(data_check);
Matrix3f I;
I.setIdentity();
A.print();
A_I.print();
Matrix3f R = A * A_I;
R.print();
assert(R == I);
TEST(isEqual(R, I));
Matrix3f R2 = A;
R2 *= A_I;
R2.print();
assert(R2 == I);
TEST(isEqual(R2, I));
Matrix3f A2 = eye<float, 3>()*2;
Matrix3f B = A2.emult(A2);
Matrix3f B_check = eye<float, 3>()*4;
assert(B == B_check);
TEST(isEqual(B, B_check));
return 0;
}