Skip to content

Commit

Permalink
Add check for unchanged XY points
Browse files Browse the repository at this point in the history
  • Loading branch information
mo-jonasganderton committed Feb 12, 2025
1 parent 25e03d2 commit c61d8a2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/tests/grid/test_cubedsphere_2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ CASE("cubed_sphere_grid_builder") {
CASE("cubed_sphere_rotated_lonlat") {
const auto grid_rotated = CubedSphereGrid2(2, Projection(util::Config("type", "rotated_lonlat")("north_pole", std::vector<double>{4., 54.})));

// Expect XY points to still match
std::vector<PointXY> points_xy;
for (const auto &xy : grid_rotated.xy()) {
points_xy.push_back(xy);
}
EXPECT(compare_2D_points<PointXY>(points_xy, kgo_lonlat) == true);

// Expect lonlats to be different
std::vector<PointLonLat> points_lonlat;
for (const auto &lonlat : grid_rotated.lonlat()) {
points_lonlat.push_back(lonlat);
Expand Down

0 comments on commit c61d8a2

Please sign in to comment.