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
+5 -5
View File
@@ -1,7 +1,7 @@
#include <assert.h>
#include <stdio.h>
#include <matrix/math.hpp>
#include "test_macros.hpp"
using namespace matrix;
@@ -13,15 +13,15 @@ int main()
Vector3f b(0, 1, 0);
Vector3f c = a.cross(b);
c.print();
assert (c == Vector3f(0,0,1));
TEST (c == Vector3f(0,0,1));
c = a % b;
assert (c == Vector3f(0,0,1));
TEST (c == Vector3f(0,0,1));
Matrix<float, 3, 1> d(c);
Vector3f e(d);
assert (e == d);
TEST (e == d);
float data[] = {4, 5, 6};
Vector3f f(data);
assert (f == Vector3f(4, 5, 6));
TEST (f == Vector3f(4, 5, 6));
return 0;
}