diff options
Diffstat (limited to 'test/style')
-rw-r--r-- | test/style/conversion/geojson_options.test.cpp | 5 | ||||
-rw-r--r-- | test/style/conversion/light.test.cpp | 2 | ||||
-rw-r--r-- | test/style/expression/expression.test.cpp | 8 | ||||
-rw-r--r-- | test/style/filter.test.cpp | 4 |
4 files changed, 15 insertions, 4 deletions
diff --git a/test/style/conversion/geojson_options.test.cpp b/test/style/conversion/geojson_options.test.cpp index 4c5a0c9aa4..181189775b 100644 --- a/test/style/conversion/geojson_options.test.cpp +++ b/test/style/conversion/geojson_options.test.cpp @@ -32,6 +32,7 @@ TEST(GeoJSONOptions, RetainsDefaults) { ASSERT_EQ(converted.maxzoom, defaults.maxzoom); ASSERT_EQ(converted.buffer, defaults.buffer); ASSERT_EQ(converted.tolerance, defaults.tolerance); + ASSERT_EQ(converted.lineMetrics, defaults.lineMetrics); // Supercluster ASSERT_EQ(converted.cluster, defaults.cluster); @@ -47,7 +48,8 @@ TEST(GeoJSONOptions, FullConversion) { "tolerance": 3, "cluster": true, "clusterRadius": 4, - "clusterMaxZoom": 5 + "clusterMaxZoom": 5, + "lineMetrics": true })JSON", error); // GeoJSON-VT @@ -55,6 +57,7 @@ TEST(GeoJSONOptions, FullConversion) { ASSERT_EQ(converted.maxzoom, 1); ASSERT_EQ(converted.buffer, 2); ASSERT_EQ(converted.tolerance, 3); + ASSERT_TRUE(converted.lineMetrics); // Supercluster ASSERT_EQ(converted.cluster, true); diff --git a/test/style/conversion/light.test.cpp b/test/style/conversion/light.test.cpp index f111e40ff3..092c476277 100644 --- a/test/style/conversion/light.test.cpp +++ b/test/style/conversion/light.test.cpp @@ -1,9 +1,9 @@ #include <mbgl/test/util.hpp> -#include <mbgl/style/conversion.hpp> #include <mbgl/style/conversion/json.hpp> #include <mbgl/style/conversion/constant.hpp> #include <mbgl/style/conversion/light.hpp> +#include <mbgl/style/conversion_impl.hpp> #include <mbgl/style/position.hpp> #include <mbgl/util/color.hpp> #include <mbgl/util/chrono.hpp> diff --git a/test/style/expression/expression.test.cpp b/test/style/expression/expression.test.cpp index 0b46facf42..4c2ec5cf92 100644 --- a/test/style/expression/expression.test.cpp +++ b/test/style/expression/expression.test.cpp @@ -1,6 +1,6 @@ #include <mbgl/test/util.hpp> #include <mbgl/util/io.hpp> -#include <mbgl/style/conversion.hpp> +#include <mbgl/style/conversion_impl.hpp> #include <mbgl/util/rapidjson.hpp> #include <mbgl/style/rapidjson_conversion.hpp> #include <mbgl/style/expression/is_expression.hpp> @@ -29,7 +29,11 @@ TEST(Expression, IsExpression) { for(auto& entry : allExpressions.GetObject()) { const std::string name { entry.name.GetString(), entry.name.GetStringLength() }; - if (name == "line-progress" || name == "feature-state") { + if (name == "line-progress" || + name == "feature-state" || + name == "interpolate-hcl" || + name == "interpolate-lab" || + name == "format") { // Not yet implemented continue; } diff --git a/test/style/filter.test.cpp b/test/style/filter.test.cpp index e04a569203..9678fe0895 100644 --- a/test/style/filter.test.cpp +++ b/test/style/filter.test.cpp @@ -251,3 +251,7 @@ TEST(Filter, ZoomExpressionNested) { TEST(Filter, Internal) { filter(R"(["filter-==","class","snow"])"); } + +TEST(Filter, Short) { + filter(R"(["==", ["id"], "foo"])"); +} |