diff options
Diffstat (limited to 'test/miscellaneous/geo.cpp')
-rw-r--r-- | test/miscellaneous/geo.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/test/miscellaneous/geo.cpp b/test/miscellaneous/geo.cpp index 093ea7040c..88f8bc496b 100644 --- a/test/miscellaneous/geo.cpp +++ b/test/miscellaneous/geo.cpp @@ -8,20 +8,20 @@ using namespace mbgl; TEST(Geo, LatLngFromTileID) { for (int i = 0; i < 20; i++) { const LatLng ll{ TileID(i, 0, 0, 0) }; - ASSERT_DOUBLE_EQ(-180, ll.latitude); - ASSERT_DOUBLE_EQ(85.051128779806604, ll.longitude); + ASSERT_DOUBLE_EQ(-180, ll.longitude); + ASSERT_DOUBLE_EQ(85.051128779806604, ll.latitude); } { const LatLng ll{ TileID(0, 1, 0, 0) }; - ASSERT_DOUBLE_EQ(180, ll.latitude); - ASSERT_DOUBLE_EQ(85.051128779806604, ll.longitude); + ASSERT_DOUBLE_EQ(180, ll.longitude); + ASSERT_DOUBLE_EQ(85.051128779806604, ll.latitude); } { const LatLng ll{ TileID(0, -1, 0, 0) }; - ASSERT_DOUBLE_EQ(-540, ll.latitude); - ASSERT_DOUBLE_EQ(85.051128779806604, ll.longitude); + ASSERT_DOUBLE_EQ(-540, ll.longitude); + ASSERT_DOUBLE_EQ(85.051128779806604, ll.latitude); } } @@ -29,33 +29,33 @@ TEST(Geo, LatLngFromTileID) { TEST(Geo, LatLngBoundsFromTileID) { { const LatLngBounds bounds{ TileID(0, 0, 0, 0) }; - ASSERT_DOUBLE_EQ(-180, bounds.sw.latitude); - ASSERT_DOUBLE_EQ(-85.051128779806604, bounds.sw.longitude); - ASSERT_DOUBLE_EQ(180, bounds.ne.latitude); - ASSERT_DOUBLE_EQ(85.051128779806604, bounds.ne.longitude); + ASSERT_DOUBLE_EQ(-180, bounds.sw.longitude); + ASSERT_DOUBLE_EQ(-85.051128779806604, bounds.sw.latitude); + ASSERT_DOUBLE_EQ(180, bounds.ne.longitude); + ASSERT_DOUBLE_EQ(85.051128779806604, bounds.ne.latitude); } { const LatLngBounds bounds{ TileID(1, 0, 1, 0) }; - ASSERT_DOUBLE_EQ(-180, bounds.sw.latitude); - ASSERT_DOUBLE_EQ(-85.051128779806604, bounds.sw.longitude); - ASSERT_DOUBLE_EQ(0, bounds.ne.latitude); + ASSERT_DOUBLE_EQ(-180, bounds.sw.longitude); + ASSERT_DOUBLE_EQ(-85.051128779806604, bounds.sw.latitude); ASSERT_DOUBLE_EQ(0, bounds.ne.longitude); + ASSERT_DOUBLE_EQ(0, bounds.ne.latitude); } { const LatLngBounds bounds{ TileID(1, 1, 1, 0) }; - ASSERT_DOUBLE_EQ(0, bounds.sw.latitude); - ASSERT_DOUBLE_EQ(-85.051128779806604, bounds.sw.longitude); - ASSERT_DOUBLE_EQ(180, bounds.ne.latitude); - ASSERT_DOUBLE_EQ(0, bounds.ne.longitude); + ASSERT_DOUBLE_EQ(0, bounds.sw.longitude); + ASSERT_DOUBLE_EQ(-85.051128779806604, bounds.sw.latitude); + ASSERT_DOUBLE_EQ(180, bounds.ne.longitude); + ASSERT_DOUBLE_EQ(0, bounds.ne.latitude); } { const LatLngBounds bounds{ TileID(1, 0, 0, 0) }; - ASSERT_DOUBLE_EQ(-180, bounds.sw.latitude); - ASSERT_DOUBLE_EQ(0, bounds.sw.longitude); - ASSERT_DOUBLE_EQ(0, bounds.ne.latitude); - ASSERT_DOUBLE_EQ(85.051128779806604, bounds.ne.longitude); + ASSERT_DOUBLE_EQ(-180, bounds.sw.longitude); + ASSERT_DOUBLE_EQ(0, bounds.sw.latitude); + ASSERT_DOUBLE_EQ(0, bounds.ne.longitude); + ASSERT_DOUBLE_EQ(85.051128779806604, bounds.ne.latitude); } } |