summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2018-11-20 16:59:17 -0800
committerMinh Nguyễn <mxn@1ec5.org>2018-11-21 09:54:05 -0800
commit7d5be980e287c979119b06c73d071f2daaea1b3d (patch)
tree62b39bb3238250a85281c041507b23f91d309398 /test
parent594d2074a3849d141219c04cdde739f86e7256b3 (diff)
downloadqtlocation-mapboxgl-7d5be980e287c979119b06c73d071f2daaea1b3d.tar.gz
[core] Fixed {prefix} evaluation
This appears to have been an attempt to use the std::string fill constructor, but it ended up creating a one-character-long string and attempting to overwrite the null terminator.
Diffstat (limited to 'test')
-rw-r--r--test/storage/resource.test.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/storage/resource.test.cpp b/test/storage/resource.test.cpp
index 083134c4d0..41bf71471a 100644
--- a/test/storage/resource.test.cpp
+++ b/test/storage/resource.test.cpp
@@ -28,10 +28,10 @@ TEST(Resource, Tile) {
EXPECT_EQ(2, rasterTile.tileData->y);
EXPECT_EQ(3, rasterTile.tileData->z);
- Resource vectorTile = Resource::tile("http://example.com/{z}/{x}/{y}.mvt", 2.0, 1, 2, 3, Tileset::Scheme::XYZ);
+ Resource vectorTile = Resource::tile("http://example.com/{prefix}/{z}/{x}/{y}.mvt", 2.0, 1, 2, 3, Tileset::Scheme::XYZ);
EXPECT_EQ(Resource::Kind::Tile, vectorTile.kind);
- EXPECT_EQ("http://example.com/3/1/2.mvt", vectorTile.url);
- EXPECT_EQ("http://example.com/{z}/{x}/{y}.mvt", vectorTile.tileData->urlTemplate);
+ EXPECT_EQ("http://example.com/12/3/1/2.mvt", vectorTile.url);
+ EXPECT_EQ("http://example.com/{prefix}/{z}/{x}/{y}.mvt", vectorTile.tileData->urlTemplate);
EXPECT_EQ(1, vectorTile.tileData->pixelRatio);
EXPECT_EQ(1, vectorTile.tileData->x);
EXPECT_EQ(2, vectorTile.tileData->y);