diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-12-12 20:11:51 +0200 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-12-13 15:34:06 +0200 |
commit | b2d06b8a17cd012d0c3accc95645780e6de6732a (patch) | |
tree | 9471f77f3707f775eccdb8c1879cefa689b7eaed /render-test/metadata.hpp | |
parent | 9901167936fa8fe13fa0f93a0604e86fc15b71cd (diff) | |
download | qtlocation-mapboxgl-b2d06b8a17cd012d0c3accc95645780e6de6732a.tar.gz |
[test runner] Split operations parsing and execution
Diffstat (limited to 'render-test/metadata.hpp')
-rw-r--r-- | render-test/metadata.hpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/render-test/metadata.hpp b/render-test/metadata.hpp index ba4a875b0c..918758c3e8 100644 --- a/render-test/metadata.hpp +++ b/render-test/metadata.hpp @@ -9,14 +9,19 @@ #include "filesystem.hpp" +#include <list> #include <map> namespace mbgl { + +class Map; +class HeadlessFrontend; namespace gfx { struct RenderingStats; } } // namespace mbgl +class TestRunnerMapObserver; struct TestStatistics { TestStatistics() = default; @@ -168,3 +173,21 @@ struct TestMetadata { TestMetrics metrics; TestMetrics expectedMetrics; }; + +class TestContext { +public: + virtual mbgl::HeadlessFrontend& getFrontend() = 0; + virtual mbgl::Map& getMap() = 0; + virtual TestRunnerMapObserver& getObserver() = 0; + virtual TestMetadata& getMetadata() = 0; + + GfxProbe activeGfxProbe; + GfxProbe baselineGfxProbe; + bool gfxProbeActive = false; + +protected: + virtual ~TestContext() = default; +}; + +using TestOperation = std::function<bool(TestContext&)>; +using TestOperations = std::list<TestOperation>;
\ No newline at end of file |