summaryrefslogtreecommitdiff
path: root/test/util
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-05-10 11:47:54 +0200
committerKonstantin Käfer <mail@kkaefer.com>2016-05-10 14:50:56 +0200
commitec70125e41e4e9db5f1d0941c0129d80f5792896 (patch)
tree639654a3dfda72cf0c1c1a2a0a353fe0b484e45e /test/util
parentbdcbceff8002d6a0ec2ce6c1d2518b03c007ddf6 (diff)
downloadqtlocation-mapboxgl-ec70125e41e4e9db5f1d0941c0129d80f5792896.tar.gz
[core] move TileData and dependents to new *TileID classes
Diffstat (limited to 'test/util')
-rw-r--r--test/util/geo.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/util/geo.cpp b/test/util/geo.cpp
index 0e00fdc6a3..95e75a0e1b 100644
--- a/test/util/geo.cpp
+++ b/test/util/geo.cpp
@@ -2,7 +2,7 @@
#include <mbgl/util/constants.hpp>
#include <mbgl/util/geo.hpp>
-#include <mbgl/map/tile_id.hpp>
+#include <mbgl/tile/tile_id.hpp>
using namespace mbgl;
@@ -87,19 +87,19 @@ TEST(LatLngBounds, Northwest) {
TEST(LatLng, FromTileID) {
for (int i = 0; i < 20; i++) {
- const LatLng ll{ TileID(i, 0, 0, 0) };
+ const LatLng ll{ CanonicalTileID(i, 0, 0) };
ASSERT_DOUBLE_EQ(-util::LONGITUDE_MAX, ll.longitude);
ASSERT_DOUBLE_EQ(util::LATITUDE_MAX, ll.latitude);
}
{
- const LatLng ll{ TileID(0, 1, 0, 0) };
+ const LatLng ll{ UnwrappedTileID(0, 1, 0) };
ASSERT_DOUBLE_EQ(util::LONGITUDE_MAX, ll.longitude);
ASSERT_DOUBLE_EQ(util::LATITUDE_MAX, ll.latitude);
}
{
- const LatLng ll{ TileID(0, -1, 0, 0) };
+ const LatLng ll{ UnwrappedTileID(0, -1, 0) };
ASSERT_DOUBLE_EQ(-540, ll.longitude);
ASSERT_DOUBLE_EQ(util::LATITUDE_MAX, ll.latitude);
}
@@ -135,7 +135,7 @@ TEST(LatLng, Boundaries) {
TEST(LatLngBounds, FromTileID) {
{
- const LatLngBounds bounds{ TileID(0, 0, 0, 0) };
+ const LatLngBounds bounds{ CanonicalTileID(0, 0, 0) };
ASSERT_DOUBLE_EQ(-util::LONGITUDE_MAX, bounds.west());
ASSERT_DOUBLE_EQ(-util::LATITUDE_MAX, bounds.south());
ASSERT_DOUBLE_EQ(util::LONGITUDE_MAX, bounds.east());
@@ -143,7 +143,7 @@ TEST(LatLngBounds, FromTileID) {
}
{
- const LatLngBounds bounds{ TileID(1, 0, 1, 0) };
+ const LatLngBounds bounds{ CanonicalTileID(1, 0, 1) };
ASSERT_DOUBLE_EQ(-util::LONGITUDE_MAX, bounds.west());
ASSERT_DOUBLE_EQ(-util::LATITUDE_MAX, bounds.south());
ASSERT_DOUBLE_EQ(0, bounds.east());
@@ -151,7 +151,7 @@ TEST(LatLngBounds, FromTileID) {
}
{
- const LatLngBounds bounds{ TileID(1, 1, 1, 0) };
+ const LatLngBounds bounds{ CanonicalTileID(1, 1, 1) };
ASSERT_DOUBLE_EQ(0, bounds.west());
ASSERT_DOUBLE_EQ(-util::LATITUDE_MAX, bounds.south());
ASSERT_DOUBLE_EQ(util::LONGITUDE_MAX, bounds.east());
@@ -159,7 +159,7 @@ TEST(LatLngBounds, FromTileID) {
}
{
- const LatLngBounds bounds{ TileID(1, 0, 0, 0) };
+ const LatLngBounds bounds{ CanonicalTileID(1, 0, 0) };
ASSERT_DOUBLE_EQ(-util::LONGITUDE_MAX, bounds.west());
ASSERT_DOUBLE_EQ(0, bounds.south());
ASSERT_DOUBLE_EQ(0, bounds.east());