summaryrefslogtreecommitdiff
path: root/test/algorithm
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2018-12-17 15:24:11 +0100
committerKonstantin Käfer <mail@kkaefer.com>2019-01-09 10:26:53 +0100
commit6f60ccf08e4878d0688ddaefd906290a2998a148 (patch)
tree6e268040cfc1ea72fa577441398ecd790553df24 /test/algorithm
parent9acdd75d04f335313a6c491599b5c7559d6458c7 (diff)
downloadqtlocation-mapboxgl-6f60ccf08e4878d0688ddaefd906290a2998a148.tar.gz
[build] generate header maps instead of -files.txt
Diffstat (limited to 'test/algorithm')
-rw-r--r--test/algorithm/mock.hpp50
-rw-r--r--test/algorithm/update_renderables.test.cpp2
2 files changed, 1 insertions, 51 deletions
diff --git a/test/algorithm/mock.hpp b/test/algorithm/mock.hpp
deleted file mode 100644
index b8eb020105..0000000000
--- a/test/algorithm/mock.hpp
+++ /dev/null
@@ -1,50 +0,0 @@
-#pragma once
-
-#include <cstdint>
-#include <string>
-#include <memory>
-#include <set>
-#include <map>
-
-#include <mbgl/tile/tile_id.hpp>
-#include <mbgl/util/range.hpp>
-
-struct MockTileData;
-
-struct MockSource {
- mbgl::Range<uint8_t> zoomRange { 0, 16 };
- std::map<mbgl::OverscaledTileID, std::unique_ptr<MockTileData>> dataTiles;
- std::set<mbgl::UnwrappedTileID> idealTiles;
-
- // Test API
- inline MockTileData* createTileData(const mbgl::OverscaledTileID& tileID);
-};
-
-struct MockBucket {};
-
-
-struct MockTileData {
- MockTileData(const mbgl::OverscaledTileID& tileID_) : tileID(tileID_) {}
-
- bool hasTriedCache() const {
- return triedOptional;
- }
-
- bool isRenderable() const {
- return renderable;
- }
-
- bool isLoaded() const {
- return loaded;
- }
-
- bool renderable = false;
- bool triedOptional = false;
- bool loaded = false;
- const mbgl::OverscaledTileID tileID;
-};
-
-MockTileData* MockSource::createTileData(const mbgl::OverscaledTileID& tileID) {
- // Replace the existing MockTileData object, if any.
- return (dataTiles[tileID] = std::make_unique<MockTileData>(tileID)).get();
-}
diff --git a/test/algorithm/update_renderables.test.cpp b/test/algorithm/update_renderables.test.cpp
index e142758f29..22d8d79443 100644
--- a/test/algorithm/update_renderables.test.cpp
+++ b/test/algorithm/update_renderables.test.cpp
@@ -1,5 +1,5 @@
-#include "mock.hpp"
#include <mbgl/test/util.hpp>
+#include <mbgl/test/mock.hpp>
#include <mbgl/util/variant.hpp>
#include <mapbox/variant_io.hpp>