diff options
author | Mike Morris <michael.patrick.morris@gmail.com> | 2014-07-17 12:44:45 -0400 |
---|---|---|
committer | Mike Morris <michael.patrick.morris@gmail.com> | 2014-07-17 12:44:45 -0400 |
commit | 4cb9972278c2121a87161e3b02b2071acc1ca8e1 (patch) | |
tree | b0f017fda1740503c1bd7d5e3a28e586648d2e77 /test/fixtures | |
parent | 056f9e88d5214ae5752ec946666c756e2bf3d72b (diff) | |
parent | fa4133a094a084527633038d2de1982ed4898a08 (diff) | |
download | qtlocation-mapboxgl-4cb9972278c2121a87161e3b02b2071acc1ca8e1.tar.gz |
Merge branch 'master' into fuzz-pipe
Conflicts:
bin/package.json
src/style/style_parser.cpp
test/fixtures/fixture_log.cpp
test/test.gyp
Diffstat (limited to 'test/fixtures')
-rw-r--r-- | test/fixtures/fixture_log.cpp | 7 | ||||
-rw-r--r-- | test/fixtures/fixture_log.hpp | 10 | ||||
-rw-r--r-- | test/fixtures/fixture_request.cpp | 12 | ||||
-rw-r--r-- | test/fixtures/styles/icons.info.json | 18 | ||||
-rw-r--r-- | test/fixtures/styles/icons.style.json | 33 | ||||
-rw-r--r-- | test/fixtures/styles/icons/default.expected.png | bin | 0 -> 6538 bytes |
6 files changed, 66 insertions, 14 deletions
diff --git a/test/fixtures/fixture_log.cpp b/test/fixtures/fixture_log.cpp index 44e9821446..c2c10fc9eb 100644 --- a/test/fixtures/fixture_log.cpp +++ b/test/fixtures/fixture_log.cpp @@ -2,7 +2,7 @@ #include <iostream> -namespace llmr { +namespace mbgl { FixtureLogBackend::~FixtureLogBackend() { std::cerr << unchecked(); @@ -24,6 +24,7 @@ std::vector<FixtureLogBackend::LogMessage> FixtureLogBackend::unchecked() const for (const LogMessage &msg : messages) { if (!msg.checked) { unchecked.push_back(msg); + msg.checked = true; } } return unchecked; @@ -39,8 +40,8 @@ std::vector<FixtureLogBackend::LogMessage> FixtureLogBackend::unchecked() const ::std::ostream& operator<<(::std::ostream& os, const FixtureLogBackend::LogMessage& message) { os << "[\"" << message.severity.get() << "\", \"" << message.event.get() << "\""; if (message.code) os << ", " << message.code.get(); - if (message.msg) os << ", \"" << message.msg.get(); - return os << "\"]" << std::endl; + if (message.msg) os << ", \"" << message.msg.get() << "\""; + return os << "]" << std::endl; } } diff --git a/test/fixtures/fixture_log.hpp b/test/fixtures/fixture_log.hpp index c41d74ab9c..263871575b 100644 --- a/test/fixtures/fixture_log.hpp +++ b/test/fixtures/fixture_log.hpp @@ -1,15 +1,15 @@ -#ifndef LLMR_TEST_FIXTURE_LOG -#define LLMR_TEST_FIXTURE_LOG +#ifndef MBGL_TEST_FIXTURE_LOG +#define MBGL_TEST_FIXTURE_LOG -#include <llmr/platform/log.hpp> -#include <llmr/util/noncopyable.hpp> +#include <mbgl/platform/log.hpp> +#include <mbgl/util/noncopyable.hpp> #include <boost/optional.hpp> #include <vector> #include <cstdarg> -namespace llmr { +namespace mbgl { class FixtureLogBackend : public LogBackend, private util::noncopyable { public: diff --git a/test/fixtures/fixture_request.cpp b/test/fixtures/fixture_request.cpp index b106dfe306..b73020590c 100644 --- a/test/fixtures/fixture_request.cpp +++ b/test/fixtures/fixture_request.cpp @@ -1,7 +1,7 @@ -#include <llmr/platform/platform.hpp> -#include <llmr/platform/request.hpp> -#include <llmr/util/uv.hpp> -#include <llmr/platform/log.hpp> +#include <mbgl/platform/platform.hpp> +#include <mbgl/platform/request.hpp> +#include <mbgl/util/uv.hpp> +#include <mbgl/platform/log.hpp> const std::string base_directory = []{ std::string fn = __FILE__; @@ -10,7 +10,7 @@ const std::string base_directory = []{ }(); -namespace llmr { +namespace mbgl { std::shared_ptr<platform::Request> platform::request_http(const std::string &url, @@ -103,4 +103,4 @@ void platform::cancel_request_http(const std::shared_ptr<Request> &req) { } } -} // end namespace llmr +} diff --git a/test/fixtures/styles/icons.info.json b/test/fixtures/styles/icons.info.json new file mode 100644 index 0000000000..e116913aa4 --- /dev/null +++ b/test/fixtures/styles/icons.info.json @@ -0,0 +1,18 @@ +{ + "default": { + "zoom": 14, + "center": [52.499167, 13.418056], + "height": 256, + "log": [ + [1, "INFO", "HttpRequest", 200, "sprites/outdoors.json"], + [1, "INFO", "HttpRequest", 200, "sprites/outdoors.png"], + [1, "INFO", "HttpRequest", 200, "tiles/14-8803-5375.vector.pbf"], + [1, "INFO", "HttpRequest", 200, "tiles/14-8802-5375.vector.pbf"], + [1, "INFO", "HttpRequest", 200, "tiles/14-8803-5374.vector.pbf"], + [1, "INFO", "HttpRequest", 200, "tiles/14-8802-5374.vector.pbf"], + [6, "INFO", "HttpRequest"], + + [1, "INFO", "Sprite", "loaded sprites/outdoors"] + ] + } +} diff --git a/test/fixtures/styles/icons.style.json b/test/fixtures/styles/icons.style.json new file mode 100644 index 0000000000..46adfbd408 --- /dev/null +++ b/test/fixtures/styles/icons.style.json @@ -0,0 +1,33 @@ +{ + "version": 3, + "sources": { + "mapbox": { + "type": "vector", + "url": "tiles/{z}-{x}-{y}.vector.pbf", + "tileSize": 512, + "maxZoom": 14 + } + }, + "sprite": "sprites/outdoors", + "layers": [ + { + "id": "background", + "type": "background", + "style": { + "background-color": "green" + } + }, + { + "id": "poi", + "source": "mapbox", + "source-layer": "poi_label", + "type": "icon", + "filter": { "maki": "restaurant" }, + "render": { + "icon-image": "{maki}-12", + "icon-size": 12, + "icon-allow-overlap": true + } + } + ] +} diff --git a/test/fixtures/styles/icons/default.expected.png b/test/fixtures/styles/icons/default.expected.png Binary files differnew file mode 100644 index 0000000000..17e3252c88 --- /dev/null +++ b/test/fixtures/styles/icons/default.expected.png |