blob: 98e208fe545c37379df36aa699920c4188a9978f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
#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 TestPaths {
mbgl::filesystem::path stylePath;
std::vector<mbgl::filesystem::path> expectations;
std::string defaultExpectations() const {
assert(!expectations.empty());
return expectations.front().string();
}
};
struct TestMetadata {
TestMetadata() = default;
TestPaths paths;
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;
};
|