diff options
Diffstat (limited to 'render-test/parser.hpp')
-rw-r--r-- | render-test/parser.hpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/render-test/parser.hpp b/render-test/parser.hpp new file mode 100644 index 0000000000..be98719ab5 --- /dev/null +++ b/render-test/parser.hpp @@ -0,0 +1,34 @@ +#pragma once + +#include <mbgl/util/rapidjson.hpp> +#include <mbgl/util/variant.hpp> + +#include <tuple> +#include <string> +#include <vector> + +#include "filesystem.hpp" + +struct TestMetadata; +struct TestStatistics; + +using ErrorMessage = std::string; +using JSONReply = mbgl::variant<mbgl::JSDocument, ErrorMessage>; + +using ArgumentsTuple = std::tuple<bool, bool, uint32_t, std::string, std::vector<std::string>>; + +JSONReply readJson(const mbgl::filesystem::path&); +std::string serializeJsonValue(const mbgl::JSValue&); + +std::vector<std::string> readExpectedEntries(const mbgl::filesystem::path& base); + +ArgumentsTuple parseArguments(int argc, char** argv); +std::vector<std::pair<std::string, std::string>> parseIgnores(); +TestMetadata parseTestMetadata(const mbgl::filesystem::path& path); + +std::string createResultPage(const TestStatistics&, const std::vector<TestMetadata>&, bool shuffle, uint32_t seed); + +std::string localizeURL(const std::string& url); + +void localizeSourceURLs(mbgl::JSValue& root, mbgl::JSDocument& document); +void localizeStyleURLs(mbgl::JSValue& root, mbgl::JSDocument& document);
\ No newline at end of file |