summaryrefslogtreecommitdiff
path: root/test/style/source.cpp
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/style/source.cpp
parentbdcbceff8002d6a0ec2ce6c1d2518b03c007ddf6 (diff)
downloadqtlocation-mapboxgl-ec70125e41e4e9db5f1d0941c0129d80f5792896.tar.gz
[core] move TileData and dependents to new *TileID classes
Diffstat (limited to 'test/style/source.cpp')
-rw-r--r--test/style/source.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/test/style/source.cpp b/test/style/source.cpp
index 7964a05814..b520fcb6fd 100644
--- a/test/style/source.cpp
+++ b/test/style/source.cpp
@@ -122,12 +122,12 @@ TEST(Source, RasterTileEmpty) {
return response;
};
- test.observer.tileLoaded = [&] (Source& source, const TileID&, bool) {
+ test.observer.tileLoaded = [&] (Source& source, const OverscaledTileID&, bool) {
EXPECT_EQ("source", source.id);
test.end();
};
- test.observer.tileError = [&] (Source&, const TileID&, std::exception_ptr) {
+ test.observer.tileError = [&] (Source&, const OverscaledTileID&, std::exception_ptr) {
FAIL() << "Should never be called";
};
@@ -151,12 +151,12 @@ TEST(Source, VectorTileEmpty) {
return response;
};
- test.observer.tileLoaded = [&] (Source& source, const TileID&, bool) {
+ test.observer.tileLoaded = [&] (Source& source, const OverscaledTileID&, bool) {
EXPECT_EQ("source", source.id);
test.end();
};
- test.observer.tileError = [&] (Source&, const TileID&, std::exception_ptr) {
+ test.observer.tileError = [&] (Source&, const OverscaledTileID&, std::exception_ptr) {
FAIL() << "Should never be called";
};
@@ -182,9 +182,9 @@ TEST(Source, RasterTileFail) {
return response;
};
- test.observer.tileError = [&] (Source& source, const TileID& tileID, std::exception_ptr error) {
+ test.observer.tileError = [&] (Source& source, const OverscaledTileID& tileID, std::exception_ptr error) {
EXPECT_EQ(SourceType::Raster, source.type);
- EXPECT_EQ("0/0/0", std::string(tileID));
+ EXPECT_EQ(OverscaledTileID(0, 0, 0), tileID);
EXPECT_EQ("Failed by the test case", util::toString(error));
test.end();
};
@@ -211,9 +211,9 @@ TEST(Source, VectorTileFail) {
return response;
};
- test.observer.tileError = [&] (Source& source, const TileID& tileID, std::exception_ptr error) {
+ test.observer.tileError = [&] (Source& source, const OverscaledTileID& tileID, std::exception_ptr error) {
EXPECT_EQ(SourceType::Vector, source.type);
- EXPECT_EQ("0/0/0", std::string(tileID));
+ EXPECT_EQ(OverscaledTileID(0, 0, 0), tileID);
EXPECT_EQ("Failed by the test case", util::toString(error));
test.end();
};
@@ -238,9 +238,9 @@ TEST(Source, RasterTileCorrupt) {
return response;
};
- test.observer.tileError = [&] (Source& source, const TileID& tileID, std::exception_ptr error) {
+ test.observer.tileError = [&] (Source& source, const OverscaledTileID& tileID, std::exception_ptr error) {
EXPECT_EQ(source.type, SourceType::Raster);
- EXPECT_EQ(std::string(tileID), "0/0/0");
+ EXPECT_EQ(OverscaledTileID(0, 0, 0), tileID);
EXPECT_TRUE(bool(error));
// Not asserting on platform-specific error text.
test.end();
@@ -266,9 +266,9 @@ TEST(Source, VectorTileCorrupt) {
return response;
};
- test.observer.tileError = [&] (Source& source, const TileID& tileID, std::exception_ptr error) {
+ test.observer.tileError = [&] (Source& source, const OverscaledTileID& tileID, std::exception_ptr error) {
EXPECT_EQ(source.type, SourceType::Vector);
- EXPECT_EQ(std::string(tileID), "0/0/0");
+ EXPECT_EQ(OverscaledTileID(0, 0, 0), tileID);
EXPECT_EQ(util::toString(error), "unknown pbf field type exception");
test.end();
};
@@ -298,11 +298,11 @@ TEST(Source, RasterTileCancel) {
return optional<Response>();
};
- test.observer.tileLoaded = [&] (Source&, const TileID&, bool) {
+ test.observer.tileLoaded = [&] (Source&, const OverscaledTileID&, bool) {
FAIL() << "Should never be called";
};
- test.observer.tileError = [&] (Source&, const TileID&, std::exception_ptr) {
+ test.observer.tileError = [&] (Source&, const OverscaledTileID&, std::exception_ptr) {
FAIL() << "Should never be called";
};
@@ -325,11 +325,11 @@ TEST(Source, VectorTileCancel) {
return optional<Response>();
};
- test.observer.tileLoaded = [&] (Source&, const TileID&, bool) {
+ test.observer.tileLoaded = [&] (Source&, const OverscaledTileID&, bool) {
FAIL() << "Should never be called";
};
- test.observer.tileError = [&] (Source&, const TileID&, std::exception_ptr) {
+ test.observer.tileError = [&] (Source&, const OverscaledTileID&, std::exception_ptr) {
FAIL() << "Should never be called";
};