Skip to content

Commit e08b237

Browse files
Fix errors reported by clang-tidy
1 parent 3512dd4 commit e08b237

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

test/polyline_test.cc

+18-18
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
using namespace geo;
1111

1212
TEST_CASE("polylineDistanceToPolyline_pointBeforeLine_getStartPoint") {
13-
auto const graph = polyline{{0.0f, 0.0f}, {1.0f, 0.0f}};
14-
auto const test_point = latlng{-1.0f, 0.0f};
13+
auto const graph = polyline{{0.0F, 0.0F}, {1.0F, 0.0F}};
14+
auto const test_point = latlng{-1.0F, 0.0F};
1515

1616
auto const closest = distance_to_polyline(test_point, graph);
1717

@@ -22,8 +22,8 @@ TEST_CASE("polylineDistanceToPolyline_pointBeforeLine_getStartPoint") {
2222
}
2323

2424
TEST_CASE("polylineDistanceToPolyline_pointAfterLine_getEndPoint") {
25-
auto const graph = polyline{{0.0f, 0.0f}, {1.0f, 0.0f}};
26-
auto const test_point = latlng{2.0f, 0.0f};
25+
auto const graph = polyline{{0.0F, 0.0F}, {1.0F, 0.0F}};
26+
auto const test_point = latlng{2.0F, 0.0F};
2727

2828
auto const closest = distance_to_polyline(test_point, graph);
2929

@@ -35,8 +35,8 @@ TEST_CASE("polylineDistanceToPolyline_pointAfterLine_getEndPoint") {
3535

3636
TEST_CASE("polylineDistanceToPolyline_pointOnLine_getPointOnLine") {
3737
auto const graph =
38-
polyline{{0.0f, 0.0f}, {1.0f, 0.0f}, {1.0f, 1.0f}, {0.0f, 1.0f}};
39-
auto const test_point = latlng{0.5f, 0.0f};
38+
polyline{{0.0F, 0.0F}, {1.0F, 0.0F}, {1.0F, 1.0F}, {0.0F, 1.0F}};
39+
auto const test_point = latlng{0.5F, 0.0F};
4040

4141
auto const closest = distance_to_polyline(test_point, graph);
4242

@@ -47,12 +47,12 @@ TEST_CASE("polylineDistanceToPolyline_pointOnLine_getPointOnLine") {
4747

4848
TEST_CASE("polylineDistanceToPolyline_pointNotOnLine_getClosestPoint") {
4949
auto const graph =
50-
polyline{{0.0f, 0.0f}, {1.0f, 0.0f}, {1.0f, 1.0f}, {0.0f, 1.0f}};
51-
auto const test_point = latlng{0.75f, 0.5f};
50+
polyline{{0.0F, 0.0F}, {1.0F, 0.0F}, {1.0F, 1.0F}, {0.0F, 1.0F}};
51+
auto const test_point = latlng{0.75F, 0.5F};
5252

5353
auto const closest = distance_to_polyline(test_point, graph);
5454

55-
auto const best = latlng{1.0f, 0.5f};
55+
auto const best = latlng{1.0F, 0.5F};
5656
CHECK(closest.segment_idx_ == 1);
5757
CHECK(std::abs(distance(test_point, best) -
5858
distance(test_point, closest.best_)) < kEpsilon);
@@ -64,17 +64,17 @@ TEST_CASE("polylineDistanceToPolyline_pointNotOnLine_getClosestPoint") {
6464
TEST_CASE(
6565
"polylineSplitPolyline_multipleCoordinates_getCorrectSegmentsForEach") {
6666
auto const graph =
67-
polyline{{0.0f, 0.0f}, {1.0f, 0.0f}, {1.0f, 1.0f}, {0.0f, 1.0f},
68-
{0.4f, 1.4f}, {1.4f, 1.4f}, {1.4f, 0.4f}, {0.4f, 0.4f}};
67+
polyline{{0.0F, 0.0F}, {1.0F, 0.0F}, {1.0F, 1.0F}, {0.0F, 1.0F},
68+
{0.4F, 1.4F}, {1.4F, 1.4F}, {1.4F, 0.4F}, {0.4F, 0.4F}};
6969
auto const test_entries =
7070
std::vector<std::tuple<geo::latlng, geo::latlng, std::size_t>>{
71-
{{0.99f, 0.95f}, {1.0f, 0.95f}, 1u},
72-
{{0.9f, 1.01f}, {0.9f, 1.0f}, 2u},
73-
{{0.6f, 0.9f}, {0.6f, 1.0f}, 2u},
74-
{{0.41f, 1.39f}, {0.41f, 1.40f}, 4u},
75-
{{1.0f, 1.5f}, {1.0f, 1.4f}, 4u},
76-
{{1.39f, 1.4f}, {1.39f, 1.4f}, 4u},
77-
{{1.41f, 0.6f}, {1.4f, 0.6f}, 5u},
71+
{{0.99F, 0.95F}, {1.0F, 0.95F}, 1U},
72+
{{0.9F, 1.01F}, {0.9F, 1.0F}, 2U},
73+
{{0.6F, 0.9F}, {0.6F, 1.0F}, 2U},
74+
{{0.41F, 1.39F}, {0.41F, 1.40F}, 4U},
75+
{{1.0F, 1.5F}, {1.0F, 1.4F}, 4U},
76+
{{1.39F, 1.4F}, {1.39F, 1.4F}, 4U},
77+
{{1.41F, 0.6F}, {1.4F, 0.6F}, 5U},
7878
};
7979

8080
for (auto const& test_entry : test_entries) {

0 commit comments

Comments
 (0)