summaryrefslogtreecommitdiff
path: root/render-test/runner.hpp
diff options
context:
space:
mode:
authorm-stephen <truestyle2005@163.com>2019-07-04 17:02:13 +0800
committerGitHub <noreply@github.com>2019-07-04 17:02:13 +0800
commit225f3e4c10cbf7021bfc15ee0441e831ac108458 (patch)
tree555aee123c1dd91a430de1143326a4b179cef4e9 /render-test/runner.hpp
parent2e5b1c647170972fc265e47dac1326cd890f341a (diff)
parent16f1854a9ca98c00a5058c55e8a59df2c3463f4d (diff)
downloadqtlocation-mapboxgl-225f3e4c10cbf7021bfc15ee0441e831ac108458.tar.gz
Merge branch 'master' into Stephen-CJK
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