#pragma once #include #include #include #include class TestRunnerMapObserver; struct TestMetadata; class TestRunner { public: TestRunner() = default; explicit TestRunner(const std::string& testRootPath); bool run(TestMetadata&); void reset(); private: bool runOperations(const std::string& key, TestMetadata&); bool checkQueryTestResults(mbgl::PremultipliedImage&& actualImage, std::vector&& features, TestMetadata&); bool checkRenderTestResults(mbgl::PremultipliedImage&& image, TestMetadata&); struct Impl { Impl(const TestMetadata&); ~Impl(); std::unique_ptr observer; mbgl::HeadlessFrontend frontend; mbgl::Map map; }; std::unordered_map> maps; std::string testRootPath{TEST_RUNNER_ROOT_PATH}; };