summaryrefslogtreecommitdiff
path: root/render-test/runner.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'render-test/runner.hpp')
-rw-r--r--render-test/runner.hpp27
1 files changed, 18 insertions, 9 deletions
diff --git a/render-test/runner.hpp b/render-test/runner.hpp
index fdea65e104..4f80286c0b 100644
--- a/render-test/runner.hpp
+++ b/render-test/runner.hpp
@@ -3,31 +3,40 @@
#include <mbgl/gfx/headless_frontend.hpp>
#include <mbgl/map/map.hpp>
+#include "manifest_parser.hpp"
+
#include <memory>
+#include <string>
+struct RunContext;
+class TestRunnerMapObserver;
struct TestMetadata;
class TestRunner {
public:
- TestRunner() = default;
-
+ explicit TestRunner(Manifest);
bool run(TestMetadata&);
void reset();
- /// Returns path of the render tests root directory.
- static const std::string& getBasePath();
- /// Returns path of mapbox-gl-native expectations directory.
- static const std::vector<std::string>& getPlatformExpectationsPaths();
+ // Manifest
+ const Manifest& getManifest() const;
+ void doShuffle(uint32_t seed);
private:
- bool runOperations(const std::string& key, TestMetadata&);
- bool checkResults(mbgl::PremultipliedImage&& image, TestMetadata&);
+ bool runOperations(const std::string& key, TestMetadata&, RunContext&);
+ bool checkQueryTestResults(mbgl::PremultipliedImage&& actualImage,
+ std::vector<mbgl::Feature>&& features,
+ TestMetadata&);
+ bool checkRenderTestResults(mbgl::PremultipliedImage&& image, TestMetadata&);
struct Impl {
Impl(const TestMetadata&);
+ ~Impl();
+ std::unique_ptr<TestRunnerMapObserver> observer;
mbgl::HeadlessFrontend frontend;
mbgl::Map map;
};
std::unordered_map<std::string, std::unique_ptr<Impl>> maps;
-}; \ No newline at end of file
+ Manifest manifest;
+};