| 6 | using namespace LNLib; |
| 7 | |
| 8 | TEST(Test_Matrix4d, Construct) |
| 9 | { |
| 10 | Matrix4d m = Matrix4d(); |
| 11 | EXPECT_TRUE(m.IsIdentity()); |
| 12 | XYZ x = XYZ(1, 0, 0); |
| 13 | XYZ y = XYZ(0, 1, 0); |
| 14 | XYZ z = XYZ(0, 0, 1); |
| 15 | XYZ w = XYZ(0, 0, 0); |
| 16 | Matrix4d m1 = Matrix4d(x,y,z,w); |
| 17 | EXPECT_TRUE(m1.IsIdentity()); |
| 18 | Matrix4d m2 = Matrix4d(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); |
| 19 | m = m2; |
| 20 | bool result = true; |
| 21 | for (int i = 0; i <= 3; i++) |
| 22 | { |
| 23 | if (!result) break; |
| 24 | for (int j = 0; j <= 3; j++) |
| 25 | { |
| 26 | if (!MathUtils::IsAlmostEqualTo(m.GetElement(i, j), 1)) |
| 27 | { |
| 28 | result = false; |
| 29 | break; |
| 30 | } |
| 31 | } |
| 32 | } |
| 33 | EXPECT_TRUE(result); |
| 34 | } |
| 35 | |
| 36 | TEST(Test_Matrix4d, Creation) |
| 37 | { |
nothing calls this directly
no test coverage detected