From 6ea892377cf0dca20e5dca77b721d251ccf48a5a Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Thu, 19 Oct 2023 22:57:26 +0800 Subject: [PATCH] wip --- src/Plugins/Pdf/pdf_image.hpp | 5 +++++ tests/Plugins/Pdf/{pdf_size_test.cpp => pdf_image_test.cpp} | 4 ++-- xmake/tests.lua | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) rename tests/Plugins/Pdf/{pdf_size_test.cpp => pdf_image_test.cpp} (95%) diff --git a/src/Plugins/Pdf/pdf_image.hpp b/src/Plugins/Pdf/pdf_image.hpp index 6c21af15f7..ebbc9067e2 100644 --- a/src/Plugins/Pdf/pdf_image.hpp +++ b/src/Plugins/Pdf/pdf_image.hpp @@ -9,6 +9,9 @@ * in the root directory or . ******************************************************************************/ +#ifndef PDF_IMAGE_HPP +#define PDF_IMAGE_HPP + #include "PDFWriter/DictionaryContext.h" #include "PDFWriter/ObjectsBasicTypes.h" #include "PDFWriter/PDFWriter.h" @@ -66,3 +69,5 @@ class pdf_raw_image { CONCRETE_NULL_CODE (pdf_raw_image); void hummus_pdf_image_size (url image, int& w, int& h); + +#endif diff --git a/tests/Plugins/Pdf/pdf_size_test.cpp b/tests/Plugins/Pdf/pdf_image_test.cpp similarity index 95% rename from tests/Plugins/Pdf/pdf_size_test.cpp rename to tests/Plugins/Pdf/pdf_image_test.cpp index beda080d75..d5819dff23 100644 --- a/tests/Plugins/Pdf/pdf_size_test.cpp +++ b/tests/Plugins/Pdf/pdf_image_test.cpp @@ -8,7 +8,7 @@ * in the root directory or . ******************************************************************************/ -#include "Pdf/pdf_hummus_renderer.hpp" +#include "Pdf/pdf_image.hpp" #include "sys_utils.hpp" #include @@ -46,4 +46,4 @@ TestHummusPdfImageSize::test_hummus_pdf_image_size () { } QTEST_MAIN (TestHummusPdfImageSize) -#include "pdf_size_test.moc" +#include "pdf_image_test.moc" diff --git a/xmake/tests.lua b/xmake/tests.lua index 4ca53d0b21..b4ed8ffea6 100644 --- a/xmake/tests.lua +++ b/xmake/tests.lua @@ -24,6 +24,7 @@ function add_target_cpp_test(filepath, dep) end add_packages("s7") add_packages("lolly") + add_packages("pdfhummus") add_includedirs({"$(buildir)", "tests/Base"}) add_includedirs(libmogan_headers)