Add a couple of test for code that wasn't tested before.

This commit is contained in:
Godzil
2020-02-18 12:20:40 +00:00
parent 6200e5ed56
commit 9f764018d3
2 changed files with 30 additions and 2 deletions

View File

@@ -188,4 +188,15 @@ TEST(TransformationTest, Chained_transformation_must_be_applied_in_reverse_order
Matrix T = C * B * A;
ASSERT_EQ(T * p, Point(15, 0, 7));
}
TEST(TransformationTest, Check_that_deg_to_rad_is_working)
{
double angle180 = deg_to_rad(180);
double angle90 = deg_to_rad(90);
double angle270 = deg_to_rad(270);
ASSERT_EQ(angle180, M_PI);
ASSERT_EQ(angle90, M_PI / 2.);
ASSERT_EQ(angle270, M_PI * 1.5);
}