Test: add unit tests for Matrix4D::decompose()

This commit is contained in:
wmayer
2023-10-19 15:00:46 +02:00
committed by wwmayer
parent 2265198ffe
commit 334ca6a416
3 changed files with 123 additions and 0 deletions

View File

@@ -67,4 +67,14 @@ TEST(Rotation, TestUniformScaleLT1)
EXPECT_EQ(scaled_rot.isSame(scaled_rot, 1.0e-7), true);
}
TEST(Rotation, TestRotationDecompose)
{
Base::Matrix4D mat;
mat.setCol(0, Base::Vector3d {1, 0, 0});
mat.setCol(1, Base::Vector3d {1, 1, 0});
mat.setCol(2, Base::Vector3d {0, 0, 1});
// decompose rotation part
EXPECT_TRUE(Base::Rotation {mat}.isIdentity());
}
// NOLINTEND(cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers)