summaryrefslogtreecommitdiff
path: root/test/style
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-01-13 12:02:31 +0100
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-01-13 13:04:59 -0800
commitcef05b9017d4e54e61354a278120ff67879f2acb (patch)
treee7d5a7e6c8c7a4f57b99f86d0acd1405d7d4fea2 /test/style
parent8cca5c89b20aa950ffe184316d135ea7c3e1abfd (diff)
downloadqtlocation-mapboxgl-cef05b9017d4e54e61354a278120ff67879f2acb.tar.gz
[core] move invariant Source ID from SourceInfo to Source
Diffstat (limited to 'test/style')
-rw-r--r--test/style/resource_loading.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/style/resource_loading.cpp b/test/style/resource_loading.cpp
index 3edbf55e3d..b4a539643a 100644
--- a/test/style/resource_loading.cpp
+++ b/test/style/resource_loading.cpp
@@ -82,7 +82,7 @@ TEST(ResourceLoading, RasterSourceFail) {
ResourceLoadingTest test(MockFileSource::RequestFail, "source_raster.json");
test.observer.sourceError = [&] (Source& source, std::exception_ptr error) {
- EXPECT_EQ(source.info.source_id, "rastersource");
+ EXPECT_EQ(source.id, "rastersource");
EXPECT_EQ(util::toString(error), "Failed by the test case");
test.end();
};
@@ -94,7 +94,7 @@ TEST(ResourceLoading, VectorSourceFail) {
ResourceLoadingTest test(MockFileSource::RequestFail, "source_vector.json");
test.observer.sourceError = [&] (Source& source, std::exception_ptr error) {
- EXPECT_EQ(source.info.source_id, "vectorsource");
+ EXPECT_EQ(source.id, "vectorsource");
EXPECT_EQ(util::toString(error), "Failed by the test case");
test.end();
};
@@ -128,7 +128,7 @@ TEST(ResourceLoading, RasterTileFail) {
ResourceLoadingTest test(MockFileSource::RequestFail, "raster.png");
test.observer.tileError = [&] (Source& source, const TileID& tileID, std::exception_ptr error) {
- EXPECT_EQ(source.info.source_id, "rastersource");
+ EXPECT_EQ(source.id, "rastersource");
EXPECT_EQ(std::string(tileID), "0/0/0");
EXPECT_EQ(util::toString(error), "Failed by the test case");
test.end();
@@ -141,7 +141,7 @@ TEST(ResourceLoading, VectorTileFail) {
ResourceLoadingTest test(MockFileSource::RequestFail, "vector.pbf");
test.observer.tileError = [&] (Source& source, const TileID& tileID, std::exception_ptr error) {
- EXPECT_EQ(source.info.source_id, "vectorsource");
+ EXPECT_EQ(source.id, "vectorsource");
EXPECT_EQ(std::string(tileID), "0/0/0");
EXPECT_EQ(util::toString(error), "Failed by the test case");
test.end();
@@ -166,7 +166,7 @@ TEST(ResourceLoading, RasterSourceCorrupt) {
ResourceLoadingTest test(MockFileSource::RequestWithCorruptedData, "source_raster.json");
test.observer.sourceError = [&] (Source& source, std::exception_ptr error) {
- EXPECT_EQ(source.info.source_id, "rastersource");
+ EXPECT_EQ(source.id, "rastersource");
EXPECT_EQ(util::toString(error), "0 - Invalid value.");
test.end();
};
@@ -178,7 +178,7 @@ TEST(ResourceLoading, VectorSourceCorrupt) {
ResourceLoadingTest test(MockFileSource::RequestWithCorruptedData, "source_vector.json");
test.observer.sourceError = [&] (Source& source, std::exception_ptr error) {
- EXPECT_EQ(source.info.source_id, "vectorsource");
+ EXPECT_EQ(source.id, "vectorsource");
EXPECT_EQ(util::toString(error), "0 - Invalid value.");
test.end();
};
@@ -213,7 +213,7 @@ TEST(ResourceLoading, RasterTileCorrupt) {
ResourceLoadingTest test(MockFileSource::RequestWithCorruptedData, "raster.png");
test.observer.tileError = [&] (Source& source, const TileID& tileID, std::exception_ptr error) {
- EXPECT_EQ(source.info.source_id, "rastersource");
+ EXPECT_EQ(source.id, "rastersource");
EXPECT_EQ(std::string(tileID), "0/0/0");
EXPECT_TRUE(bool(error));
// Not asserting on platform-specific error text.
@@ -227,7 +227,7 @@ TEST(ResourceLoading, VectorTileCorrupt) {
ResourceLoadingTest test(MockFileSource::RequestWithCorruptedData, "vector.pbf");
test.observer.tileError = [&] (Source& source, const TileID& tileID, std::exception_ptr error) {
- EXPECT_EQ(source.info.source_id, "vectorsource");
+ EXPECT_EQ(source.id, "vectorsource");
EXPECT_EQ(std::string(tileID), "0/0/0");
EXPECT_EQ(util::toString(error), "pbf unknown field type exception");
test.end();