|
|
@@ -43,9 +43,9 @@ std::vector<line> const point_pairs{
|
|
|
INSTANTIATE_TEST_CASE_P(LineIntersection, FromOriginTest,
|
|
|
ValuesIn(point_pairs));
|
|
|
|
|
|
-struct XUnitTest : TestWithParam<point> {};
|
|
|
+struct UnitLineTest : TestWithParam<point> {};
|
|
|
|
|
|
-TEST_P(XUnitTest, OrthoOnIntersection) {
|
|
|
+TEST_P(UnitLineTest, OrthoOnIntersection) {
|
|
|
line const ln{{{0, 0}}, {{1, 0}}};
|
|
|
point const pt = GetParam();
|
|
|
line const expected{pt, {{pt[0], 0}}};
|
|
|
@@ -53,11 +53,10 @@ TEST_P(XUnitTest, OrthoOnIntersection) {
|
|
|
Eq(expected));
|
|
|
}
|
|
|
|
|
|
-TEST_P(XUnitTest, OrthoOnIntersectionY) {
|
|
|
+TEST_P(UnitLineTest, OrthoOnIntersectionY) {
|
|
|
line const ln{{{0, 0}}, {{0, 1}}};
|
|
|
point const pt = GetParam();
|
|
|
line const expected{pt, {{pt[0], 0}}};
|
|
|
- math::lines::orthogonal(ln, pt);
|
|
|
EXPECT_THAT(math::lines::orthogonal(ln, pt),
|
|
|
Eq(expected));
|
|
|
}
|
|
|
@@ -68,7 +67,7 @@ std::vector<point> x_orthos{
|
|
|
{{2, 1}}, {{1, 2}}, {{-2, 1}}, {{-1, 2}}, {{1, -2}}, {{2, -1}}
|
|
|
};
|
|
|
|
|
|
-INSTANTIATE_TEST_CASE_P(LineOrthogonal, XUnitTest, ValuesIn(x_orthos));
|
|
|
+INSTANTIATE_TEST_CASE_P(LineOrthogonal, UnitLineTest, ValuesIn(x_orthos));
|
|
|
|
|
|
struct DiagonalTest : TestWithParam<std::pair<point, float>> {};
|
|
|
|