38 lines
483 B
C++
38 lines
483 B
C++
#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
|