summaryrefslogtreecommitdiff
path: root/render-test/runner.hpp
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2019-06-13 18:57:25 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2019-06-25 20:10:21 +0300
commit3b0e5a59a288b165e7fac26c22ff51ee524e1568 (patch)
tree58c8b38a186581bc7f24ab78eff2bfd4a69a73dd /render-test/runner.hpp
parent78e5a264e0d08354cd1c0aa7f32c429784460f5f (diff)
downloadqtlocation-mapboxgl-3b0e5a59a288b165e7fac26c22ff51ee524e1568.tar.gz
[core] Implement C++ render test runner
Diffstat (limited to 'render-test/runner.hpp')
-rw-r--r--render-test/runner.hpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/render-test/runner.hpp b/render-test/runner.hpp
new file mode 100644
index 0000000000..cbc0f42546
--- /dev/null
+++ b/render-test/runner.hpp
@@ -0,0 +1,28 @@
+#pragma once
+
+#include <mbgl/gfx/headless_frontend.hpp>
+#include <mbgl/map/map.hpp>
+
+#include <memory>
+
+struct TestMetadata;
+
+class TestRunner {
+public:
+ TestRunner() = default;
+
+ bool run(TestMetadata&);
+ void reset();
+
+private:
+ bool runOperations(const std::string& key, TestMetadata&);
+ bool checkImage(mbgl::PremultipliedImage&& image, TestMetadata&);
+
+ struct Impl {
+ Impl(const TestMetadata&);
+
+ mbgl::HeadlessFrontend frontend;
+ mbgl::Map map;
+ };
+ std::unordered_map<std::string, std::unique_ptr<Impl>> maps;
+}; \ No newline at end of file