summaryrefslogtreecommitdiff
path: root/render-test/metadata.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/metadata.hpp
parent78e5a264e0d08354cd1c0aa7f32c429784460f5f (diff)
downloadqtlocation-mapboxgl-3b0e5a59a288b165e7fac26c22ff51ee524e1568.tar.gz
[core] Implement C++ render test runner
Diffstat (limited to 'render-test/metadata.hpp')
-rw-r--r--render-test/metadata.hpp52
1 files changed, 52 insertions, 0 deletions
diff --git a/render-test/metadata.hpp b/render-test/metadata.hpp
new file mode 100644
index 0000000000..4be83a5436
--- /dev/null
+++ b/render-test/metadata.hpp
@@ -0,0 +1,52 @@
+#pragma once
+
+#include <mbgl/util/rapidjson.hpp>
+#include <mbgl/util/size.hpp>
+
+#include <mbgl/map/mode.hpp>
+
+#include "filesystem.hpp"
+
+struct TestStatistics {
+ TestStatistics() = default;
+
+ uint32_t ignoreFailedTests = 0;
+ uint32_t ignorePassedTests = 0;
+ uint32_t erroredTests = 0;
+ uint32_t failedTests = 0;
+ uint32_t passedTests = 0;
+};
+
+struct TestMetadata {
+ TestMetadata() = default;
+
+ mbgl::filesystem::path path;
+ mbgl::JSDocument document;
+
+ mbgl::Size size{ 512u, 512u };
+ float pixelRatio = 1.0f;
+ double allowed = 0.00015; // diff
+ std::string description;
+ mbgl::MapMode mapMode = mbgl::MapMode::Static;
+ mbgl::MapDebugOptions debug = mbgl::MapDebugOptions::NoDebug;
+ bool crossSourceCollisions = true;
+ bool axonometric = false;
+ double xSkew = 0.0;
+ double ySkew = 1.0;
+
+ // TODO
+ uint32_t fadeDuration = 0;
+ bool addFakeCanvas = false;
+
+ // HTML
+ std::string id;
+ std::string status;
+ std::string color;
+
+ std::string actual;
+ std::string expected;
+ std::string diff;
+
+ std::string errorMessage;
+ double difference = 0.0;
+}; \ No newline at end of file