| 1 | /** |
| 2 | * Copyright (C) 2007 by Dominik Seichter <[email protected]> |
| 3 | * Copyright (C) 2021 by Francesco Pretto <[email protected]> |
| 4 | * |
| 5 | * Licensed under GNU Library General Public 2.0 or later. |
| 6 | * Some rights reserved. See COPYING, AUTHORS. |
| 7 | */ |
| 8 | |
| 9 | #define CATCH_CONFIG_RUNNER |
| 10 | #include <catch.hpp> |
| 11 | |
| 12 | #include <PdfTest.h> |
| 13 | |
| 14 | using namespace std; |
| 15 | using namespace PoDoFo; |
| 16 | |
| 17 | int main(int argc, char* argv[]) |
| 18 | { |
| 19 | // Add a fonts directory for more consistents run |
| 20 | auto fontPath = TestUtils::GetTestInputPath() / "Fonts"; |
| 21 | if (!fs::exists(fontPath)) |
| 22 | { |
| 23 | throw runtime_error("Missing Fonts directory. Ensure you have correctly " |
| 24 | "fetched \"extern/resources\" git submodule"); |
| 25 | } |
| 26 | |
| 27 | PdfCommon::AddFontDirectory(fontPath.u8string()); |
| 28 | PdfCommon::SetMaxLoggingSeverity(PdfLogSeverity::Warning); |
| 29 | return Catch::Session().run(argc, argv); |
| 30 | } |