diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2015-07-14 15:14:39 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2015-07-14 16:58:32 +0300 |
commit | 0ea8a37cb081302707c7815f3df5745bd3d6eef3 (patch) | |
tree | 1a6d5511d12ee57e461b48b6552bef47e9a053aa /test/miscellaneous | |
parent | 2aad2f4e14ab762847141788e725d50e1ee44ace (diff) | |
download | qtlocation-mapboxgl-0ea8a37cb081302707c7815f3df5745bd3d6eef3.tar.gz |
Unify default transition values in MapData
Relevant changes:
- Added 'defaultFadeDuration' and 'defaultTransitionDelay' to MapData;
- Painter & StyleParser now receives a reference to MapData;
- As previously seen on the code: 300ms is the default fade duration
and 0ms is the default transition duration;
- We no longer pass the current time point to Style, since it now uses
MapData.animationTime, which gets updated in MapContext::update().
- Updated StyleParser check to use a mock MapData;
Diffstat (limited to 'test/miscellaneous')
-rw-r--r-- | test/miscellaneous/style_parser.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/miscellaneous/style_parser.cpp b/test/miscellaneous/style_parser.cpp index 7a38ba054d..e88d798411 100644 --- a/test/miscellaneous/style_parser.cpp +++ b/test/miscellaneous/style_parser.cpp @@ -3,6 +3,9 @@ #include <mbgl/style/style_parser.hpp> #include <mbgl/util/io.hpp> +#include <mbgl/map/mode.hpp> +#include <mbgl/map/map_data.hpp> + #include <rapidjson/document.h> #include "../fixtures/fixture_log_observer.hpp" @@ -35,7 +38,11 @@ TEST_P(StyleParserTest, ParseStyle) { FixtureLogObserver* observer = new FixtureLogObserver(); Log::setObserver(std::unique_ptr<Log::Observer>(observer)); - StyleParser parser; + MapMode mapMode = MapMode::Continuous; + const float pixelRatio = 1.0f; + + MapData data(mapMode, pixelRatio); + StyleParser parser(data); parser.parse(styleDoc); for (auto it = infoDoc.MemberBegin(), end = infoDoc.MemberEnd(); it != end; it++) { |