summaryrefslogtreecommitdiff
path: root/test/api/annotations.cpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-01-11 12:52:41 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-01-13 13:40:31 -0800
commit86c8446d3a4390ff6577d070ac8b5fa3ad3c5cd1 (patch)
treeef10190d3fca34ff72b2473816901088b0b85ac2 /test/api/annotations.cpp
parent2126e34e52dc5dd94c5a3907b240e62ee17d1e70 (diff)
downloadqtlocation-mapboxgl-86c8446d3a4390ff6577d070ac8b5fa3ad3c5cd1.tar.gz
[core] Simplify asset:// implementation
* Move asset:// URL handling to DefaultFileSource. * AssetFileSource implements FileSource interface and follows familiar implementation patterns. * Move default implementation to platform/default, zip implementation to platform/android. * Don't bother with modified / expires / etag -- assets are not cached so it doesn't matter. * Don't bother with interleaving individual IO calls on the implementation thread. That adds a lot of complexity for very little benefit.
Diffstat (limited to 'test/api/annotations.cpp')
-rw-r--r--test/api/annotations.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/api/annotations.cpp b/test/api/annotations.cpp
index 1b088b52c5..d80cff9e8e 100644
--- a/test/api/annotations.cpp
+++ b/test/api/annotations.cpp
@@ -31,7 +31,7 @@ void checkRendering(Map& map, const char * name) {
TEST(Annotations, PointAnnotation) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
- OnlineFileSource fileSource(nullptr, test::getFileSourceRoot());
+ OnlineFileSource fileSource(nullptr);
Map map(view, fileSource, MapMode::Still);
map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
@@ -44,7 +44,7 @@ TEST(Annotations, PointAnnotation) {
TEST(Annotations, LineAnnotation) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
- OnlineFileSource fileSource(nullptr, test::getFileSourceRoot());
+ OnlineFileSource fileSource(nullptr);
Map map(view, fileSource, MapMode::Still);
map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
@@ -63,7 +63,7 @@ TEST(Annotations, LineAnnotation) {
TEST(Annotations, FillAnnotation) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
- OnlineFileSource fileSource(nullptr, test::getFileSourceRoot());
+ OnlineFileSource fileSource(nullptr);
Map map(view, fileSource, MapMode::Still);
map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
@@ -81,7 +81,7 @@ TEST(Annotations, FillAnnotation) {
TEST(Annotations, StyleSourcedShapeAnnotation) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
- OnlineFileSource fileSource(nullptr, test::getFileSourceRoot());
+ OnlineFileSource fileSource(nullptr);
Map map(view, fileSource, MapMode::Still);
map.setStyleJSON(util::read_file("test/fixtures/api/annotation.json"), "");
@@ -96,7 +96,7 @@ TEST(Annotations, StyleSourcedShapeAnnotation) {
TEST(Annotations, AddMultiple) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
- OnlineFileSource fileSource(nullptr, test::getFileSourceRoot());
+ OnlineFileSource fileSource(nullptr);
Map map(view, fileSource, MapMode::Still);
map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
@@ -113,7 +113,7 @@ TEST(Annotations, AddMultiple) {
TEST(Annotations, NonImmediateAdd) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
- OnlineFileSource fileSource(nullptr, test::getFileSourceRoot());
+ OnlineFileSource fileSource(nullptr);
Map map(view, fileSource, MapMode::Still);
map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
@@ -133,7 +133,7 @@ TEST(Annotations, NonImmediateAdd) {
TEST(Annotations, UpdatePoint) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
- OnlineFileSource fileSource(nullptr, test::getFileSourceRoot());
+ OnlineFileSource fileSource(nullptr);
Map map(view, fileSource, MapMode::Still);
map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
@@ -152,7 +152,7 @@ TEST(Annotations, UpdatePoint) {
TEST(Annotations, RemovePoint) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
- OnlineFileSource fileSource(nullptr, test::getFileSourceRoot());
+ OnlineFileSource fileSource(nullptr);
Map map(view, fileSource, MapMode::Still);
map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
@@ -169,7 +169,7 @@ TEST(Annotations, RemovePoint) {
TEST(Annotations, RemoveShape) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
- OnlineFileSource fileSource(nullptr, test::getFileSourceRoot());
+ OnlineFileSource fileSource(nullptr);
AnnotationSegments segments = {{ {{ { 0, 0 }, { 45, 45 } }} }};
@@ -191,7 +191,7 @@ TEST(Annotations, RemoveShape) {
TEST(Annotations, ImmediateRemoveShape) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
- OnlineFileSource fileSource(nullptr, test::getFileSourceRoot());
+ OnlineFileSource fileSource(nullptr);
Map map(view, fileSource, MapMode::Still);
map.removeAnnotation(map.addShapeAnnotation(ShapeAnnotation({}, {})));
@@ -203,7 +203,7 @@ TEST(Annotations, ImmediateRemoveShape) {
TEST(Annotations, SwitchStyle) {
auto display = std::make_shared<mbgl::HeadlessDisplay>();
HeadlessView view(display, 1);
- OnlineFileSource fileSource(nullptr, test::getFileSourceRoot());
+ OnlineFileSource fileSource(nullptr);
Map map(view, fileSource, MapMode::Still);
map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");