summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-04-01 11:29:28 +0300
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-04-17 17:21:41 +0300
commit4b21560cf59877125ea0bdae1a2546ab06f1efb2 (patch)
treebd7f76fd51c29c63ef7b15964752f9c8c9e3bf38 /test
parent1a66a02097f0e3c95a4d06610fc0b7609f6d77b9 (diff)
downloadqtlocation-mapboxgl-4b21560cf59877125ea0bdae1a2546ab06f1efb2.tar.gz
[core] Use `style::LayerProperties` in render layers, buckets and layouts.
Diffstat (limited to 'test')
-rw-r--r--test/renderer/group_by_layout.test.cpp60
-rw-r--r--test/test-files.json1
2 files changed, 0 insertions, 61 deletions
diff --git a/test/renderer/group_by_layout.test.cpp b/test/renderer/group_by_layout.test.cpp
deleted file mode 100644
index d1a7a0bf5f..0000000000
--- a/test/renderer/group_by_layout.test.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-#include <mbgl/test/util.hpp>
-
-#include <mbgl/layermanager/layer_manager.hpp>
-#include <mbgl/renderer/group_by_layout.hpp>
-#include <mbgl/renderer/render_layer.hpp>
-#include <mbgl/style/layers/background_layer.hpp>
-#include <mbgl/style/layers/circle_layer.hpp>
-#include <mbgl/style/layers/line_layer.hpp>
-#include <mbgl/style/expression/dsl.hpp>
-
-using namespace mbgl;
-using namespace mbgl::style;
-using namespace mbgl::style::expression;
-
-static std::vector<std::unique_ptr<RenderLayer>> toRenderLayers(const std::vector<std::unique_ptr<Layer>>& layers) {
- std::vector<std::unique_ptr<RenderLayer>> result;
- result.reserve(layers.size());
- for (auto& layer : layers) {
- result.push_back(LayerManager::get()->createRenderLayer(layer->baseImpl));
- }
- return result;
-}
-
-TEST(GroupByLayout, Related) {
- std::vector<std::unique_ptr<Layer>> layers;
- layers.push_back(std::make_unique<LineLayer>("a", "source"));
- layers.push_back(std::make_unique<LineLayer>("b", "source"));
- auto result = groupByLayout(toRenderLayers(layers));
- ASSERT_EQ(1u, result.size());
- ASSERT_EQ(2u, result[0].size());
-}
-
-TEST(GroupByLayout, UnrelatedType) {
- std::vector<std::unique_ptr<Layer>> layers;
- layers.push_back(std::make_unique<BackgroundLayer>("background"));
- layers.push_back(std::make_unique<CircleLayer>("circle", "source"));
- auto result = groupByLayout(toRenderLayers(layers));
- ASSERT_EQ(2u, result.size());
-}
-
-TEST(GroupByLayout, UnrelatedFilter) {
- using namespace mbgl::style::expression::dsl;
- std::vector<std::unique_ptr<Layer>> layers;
- auto lineLayer = std::make_unique<LineLayer>("a", "source");
- lineLayer->setFilter(Filter(get("property")));
- layers.push_back(std::move(lineLayer));
- layers.push_back(std::make_unique<LineLayer>("b", "source"));
- auto result = groupByLayout(toRenderLayers(layers));
- ASSERT_EQ(2u, result.size());
-}
-
-TEST(GroupByLayout, UnrelatedLayout) {
- std::vector<std::unique_ptr<Layer>> layers;
- auto lineLayer = std::make_unique<LineLayer>("a", "source");
- lineLayer->setLineCap(LineCapType::Square);
- layers.push_back(std::move(lineLayer));
- layers.push_back(std::make_unique<LineLayer>("b", "source"));
- auto result = groupByLayout(toRenderLayers(layers));
- ASSERT_EQ(2u, result.size());
-}
diff --git a/test/test-files.json b/test/test-files.json
index 0ba0a07577..df46689d50 100644
--- a/test/test-files.json
+++ b/test/test-files.json
@@ -28,7 +28,6 @@
"test/programs/binary_program.test.cpp",
"test/programs/symbol_program.test.cpp",
"test/renderer/backend_scope.test.cpp",
- "test/renderer/group_by_layout.test.cpp",
"test/renderer/image_manager.test.cpp",
"test/sprite/sprite_loader.test.cpp",
"test/sprite/sprite_parser.test.cpp",