Skip to content

Commit

Permalink
Fix tests (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelKutzner authored Aug 27, 2024
1 parent 82ff7ce commit c4ef56b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 5 additions & 3 deletions test/point_rtree_test.cc
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#include "doctest/doctest.h"

#include "geo/latlng.h"

#include "geo/point_rtree.h"

TEST_CASE("point rtree") {
std::vector<geo::latlng> points;

points.emplace_back(49.8726016, 8.6310396); // Hauptbahnhof
points.emplace_back(49.8728246, 8.6512529); // Luisenplatz
points.emplace_back(49.8780513, 8.6547033); // Algo Offices
points.push_back(geo::latlng{49.8726016, 8.6310396}); // Hauptbahnhof
points.push_back(geo::latlng{49.8728246, 8.6512529}); // Luisenplatz
points.push_back(geo::latlng{49.8780513, 8.6547033}); // Algo Offices

auto const rtree = make_point_rtree(points, [](auto const& e) { return e; });

Expand Down
3 changes: 2 additions & 1 deletion test/xyz_test.cc
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ TEST_CASE("xyz haversine_distance") {
std::uniform_real_distribution<> lng_dist{0., 360.};

for (auto i = 0; i < kSize; ++i) {
latlng_pos.emplace_back(lat_dist(gen) - 90.0, lng_dist(gen) - 180.0);
latlng_pos.push_back(
geo::latlng{lat_dist(gen) - 90.0, lng_dist(gen) - 180.0});
}
}

Expand Down

0 comments on commit c4ef56b

Please sign in to comment.