diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-11-19 14:20:59 +0200 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-11-19 15:03:28 +0200 |
commit | 9f24115d138c7b96aef6ba20a529fde2e52dcfa3 (patch) | |
tree | dc61b28e1dd7c9baad97473ebc180168d10ab391 | |
parent | 37b332899be5df9efc6bd0c22e00684c4d4912fa (diff) | |
download | qtlocation-mapboxgl-9f24115d138c7b96aef6ba20a529fde2e52dcfa3.tar.gz |
[core] Identation and build fixes
-rw-r--r-- | next/test/CMakeLists.txt | 1 | ||||
-rw-r--r-- | test/tile/tile_cache.test.cpp | 65 |
2 files changed, 32 insertions, 34 deletions
diff --git a/next/test/CMakeLists.txt b/next/test/CMakeLists.txt index 4995fa4e56..12a6d8108c 100644 --- a/next/test/CMakeLists.txt +++ b/next/test/CMakeLists.txt @@ -77,6 +77,7 @@ add_library( ${MBGL_ROOT}/test/tile/geometry_tile_data.test.cpp ${MBGL_ROOT}/test/tile/raster_dem_tile.test.cpp ${MBGL_ROOT}/test/tile/raster_tile.test.cpp + ${MBGL_ROOT}/test/tile/tile_cache.test.cpp ${MBGL_ROOT}/test/tile/tile_coordinate.test.cpp ${MBGL_ROOT}/test/tile/tile_id.test.cpp ${MBGL_ROOT}/test/tile/vector_tile.test.cpp diff --git a/test/tile/tile_cache.test.cpp b/test/tile/tile_cache.test.cpp index 521432e69a..e64ad0bb79 100644 --- a/test/tile/tile_cache.test.cpp +++ b/test/tile/tile_cache.test.cpp @@ -3,21 +3,21 @@ #include <mbgl/tile/tile_cache.hpp> #include <mbgl/test/fake_file_source.hpp> +#include <mbgl/tile/tile_loader_impl.hpp> #include <mbgl/tile/vector_tile.hpp> #include <mbgl/tile/vector_tile_data.hpp> -#include <mbgl/tile/tile_loader_impl.hpp> -#include <mbgl/util/run_loop.hpp> +#include <mbgl/annotation/annotation_manager.hpp> +#include <mbgl/geometry/feature_index.hpp> #include <mbgl/map/transform.hpp> -#include <mbgl/style/style.hpp> -#include <mbgl/style/layers/symbol_layer.hpp> -#include <mbgl/renderer/tile_parameters.hpp> #include <mbgl/renderer/buckets/symbol_bucket.hpp> -#include <mbgl/renderer/query.hpp> -#include <mbgl/geometry/feature_index.hpp> -#include <mbgl/annotation/annotation_manager.hpp> #include <mbgl/renderer/image_manager.hpp> +#include <mbgl/renderer/query.hpp> +#include <mbgl/renderer/tile_parameters.hpp> +#include <mbgl/style/layers/symbol_layer.hpp> +#include <mbgl/style/style.hpp> #include <mbgl/text/glyph_manager.hpp> +#include <mbgl/util/run_loop.hpp> #include <memory> @@ -28,39 +28,38 @@ public: std::shared_ptr<FileSource> fileSource = std::make_shared<FakeFileSource>(); TransformState transformState; util::RunLoop loop; - style::Style style { *fileSource, 1 }; - AnnotationManager annotationManager { style }; + style::Style style{*fileSource, 1}; + AnnotationManager annotationManager{style}; ImageManager imageManager; GlyphManager glyphManager; - Tileset tileset { { "https://example.com" }, { 0, 22 }, "none" }; + Tileset tileset{{"https://example.com"}, {0, 22}, "none"}; - TileParameters tileParameters { - 1.0, - MapDebugOptions(), - transformState, - fileSource, - MapMode::Continuous, - annotationManager, - imageManager, - glyphManager, - 0 - }; + TileParameters tileParameters{1.0, + MapDebugOptions(), + transformState, + fileSource, + MapMode::Continuous, + annotationManager, + imageManager, + glyphManager, + 0}; }; class VectorTileMock : public VectorTile { - public: - VectorTileMock(const OverscaledTileID & id, - std::string sourceID, - const TileParameters & parameters, - const Tileset & tileset) : VectorTile(id, sourceID, parameters, tileset) - { renderable = true; } +public: + VectorTileMock(const OverscaledTileID& id, + std::string sourceID, + const TileParameters& parameters, + const Tileset& tileset) + : VectorTile(id, sourceID, parameters, tileset) { + renderable = true; + } }; - TEST(TileCache, Smoke) { VectorTileTest test; TileCache cache(1); - OverscaledTileID id(0,0,0); + OverscaledTileID id(0, 0, 0); std::unique_ptr<Tile> tile = std::make_unique<VectorTileMock>(id, "source", test.tileParameters, test.tileset); cache.add(id, std::move(tile)); @@ -69,12 +68,11 @@ TEST(TileCache, Smoke) { EXPECT_FALSE(cache.has(id)); } - TEST(TileCache, Issue15926) { VectorTileTest test; TileCache cache(2); - OverscaledTileID id0(0,0,0); - OverscaledTileID id1(1,0,0); + OverscaledTileID id0(0, 0, 0); + OverscaledTileID id1(1, 0, 0); std::unique_ptr<Tile> tile1 = std::make_unique<VectorTileMock>(id0, "source", test.tileParameters, test.tileset); std::unique_ptr<Tile> tile2 = std::make_unique<VectorTileMock>(id0, "source", test.tileParameters, test.tileset); std::unique_ptr<Tile> tile3 = std::make_unique<VectorTileMock>(id1, "source", test.tileParameters, test.tileset); @@ -87,4 +85,3 @@ TEST(TileCache, Issue15926) { EXPECT_FALSE(cache.has(id0)); EXPECT_TRUE(cache.has(id1)); } - |