summaryrefslogtreecommitdiff
path: root/test/src/mbgl
diff options
context:
space:
mode:
authorIvo van Dongen <info@ivovandongen.nl>2017-01-31 15:44:18 +0200
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-02-02 09:44:42 -0800
commit8a5bff8ee630673c6ebc496322eab94a41ae9353 (patch)
tree8bb6428cd9c3d591c237d77f94d4b0e56efb0ee0 /test/src/mbgl
parent141e995806576364d185626176c1b993fc519291 (diff)
downloadqtlocation-mapboxgl-8a5bff8ee630673c6ebc496322eab94a41ae9353.tar.gz
[core] default value support in categorical function conversion
Diffstat (limited to 'test/src/mbgl')
-rw-r--r--test/src/mbgl/test/stub_geometry_tile_feature.hpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/src/mbgl/test/stub_geometry_tile_feature.hpp b/test/src/mbgl/test/stub_geometry_tile_feature.hpp
new file mode 100644
index 0000000000..21d198a96b
--- /dev/null
+++ b/test/src/mbgl/test/stub_geometry_tile_feature.hpp
@@ -0,0 +1,34 @@
+#include <mbgl/tile/geometry_tile_data.hpp>
+#include <mbgl/util/feature.hpp>
+
+namespace mbgl {
+
+class StubGeometryTileFeature : public GeometryTileFeature {
+public:
+ StubGeometryTileFeature(PropertyMap properties_)
+ : properties(std::move(properties_)) {
+ }
+
+ PropertyMap properties;
+ optional<FeatureIdentifier> id = {};
+ FeatureType type = FeatureType::Point;
+ GeometryCollection geometry = {};
+
+ FeatureType getType() const override {
+ return type;
+ }
+
+ optional<FeatureIdentifier> getID() const override {
+ return id;
+ }
+
+ optional<Value> getValue(const std::string& key) const override {
+ return properties.count(key) ? properties.at(key) : optional<Value>();
+ }
+
+ GeometryCollection getGeometries() const override {
+ return geometry;
+ }
+};
+
+} // namespace mbgl