work on raytracing
This commit is contained in:
37
tests/math/TestMatrix4.cpp
Normal file
37
tests/math/TestMatrix4.cpp
Normal file
@@ -0,0 +1,37 @@
|
||||
#ifdef WITH_TESTS
|
||||
|
||||
#include "../Tests.h"
|
||||
#include "../../math/Matrix4.h"
|
||||
|
||||
|
||||
TEST(Matrix4, mul) {
|
||||
|
||||
Matrix4 mat1 = Matrix4::identity();
|
||||
Matrix4 mat2 = Matrix4::identity();
|
||||
|
||||
ASSERT_EQ(mat1, mat2);
|
||||
|
||||
}
|
||||
|
||||
TEST(Matrix4, vecMul) {
|
||||
|
||||
Matrix4 mat = Matrix4::identity();
|
||||
|
||||
Vector4 vec(1,1,1,1);
|
||||
|
||||
Vector4 v2 = mat*vec;
|
||||
|
||||
int i = 0; (void) i;
|
||||
|
||||
}
|
||||
|
||||
TEST(Matrix4, rot) {
|
||||
|
||||
Matrix4 mat = Matrix4::getRotationDeg(0,0,0);
|
||||
Vector4 vec(1,0,0,1);
|
||||
Vector4 v2 = mat*vec;
|
||||
ASSERT_EQ(v2, vec);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user