2026-05-15 10:39:16 +05:30
|
|
|
# Engine test suite. Phase 0: a single smoke test that backs Gate G0.
|
|
|
|
|
|
|
|
|
|
add_executable(pdfengine_smoke
|
|
|
|
|
smoke_test.cpp
|
2026-05-21 11:45:41 +05:30
|
|
|
fonts_test.cpp
|
2026-05-22 15:49:10 +05:30
|
|
|
graphics_state_test.cpp
|
|
|
|
|
display_list_test.cpp
|
2026-05-22 15:47:48 +05:30
|
|
|
document_test.cpp
|
2026-05-25 10:34:39 +05:30
|
|
|
skia_renderer_test.cpp
|
2026-06-16 19:06:48 +05:30
|
|
|
lexer_test.cpp
|
|
|
|
|
parser_test.cpp
|
|
|
|
|
content_builder_test.cpp
|
|
|
|
|
ast_serializer_test.cpp
|
|
|
|
|
content_serializer_test.cpp
|
|
|
|
|
qpdf_writer_test.cpp
|
2026-05-15 10:39:16 +05:30
|
|
|
)
|
|
|
|
|
|
2026-06-16 19:06:48 +05:30
|
|
|
if(PDFENGINE_WITH_QPDF)
|
|
|
|
|
target_sources(pdfengine_smoke PRIVATE qpdf_extractor_test.cpp)
|
|
|
|
|
endif()
|
|
|
|
|
|
2026-05-15 10:39:16 +05:30
|
|
|
target_link_libraries(pdfengine_smoke
|
|
|
|
|
PRIVATE
|
|
|
|
|
pdfengine::pdfengine
|
|
|
|
|
GTest::gtest
|
|
|
|
|
GTest::gtest_main
|
|
|
|
|
)
|
|
|
|
|
|
2026-05-25 10:34:39 +05:30
|
|
|
if(PDFENGINE_WITH_SKIA)
|
|
|
|
|
target_link_libraries(pdfengine_smoke PRIVATE skia::skia)
|
|
|
|
|
endif()
|
|
|
|
|
|
2026-06-16 19:06:48 +05:30
|
|
|
if(MSVC)
|
|
|
|
|
target_link_options(pdfengine_smoke PRIVATE "/FORCE:MULTIPLE")
|
|
|
|
|
endif()
|
|
|
|
|
|
2026-05-21 11:45:41 +05:30
|
|
|
target_include_directories(pdfengine_smoke
|
|
|
|
|
PRIVATE
|
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/../src"
|
|
|
|
|
)
|
|
|
|
|
|
2026-05-22 15:47:48 +05:30
|
|
|
# Locate and normalize corpus path
|
|
|
|
|
set(TEST_CORPUS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../corpus" CACHE PATH "Path to test corpus")
|
|
|
|
|
file(TO_CMAKE_PATH "${TEST_CORPUS_DIR}" TEST_CORPUS_DIR_NORM)
|
|
|
|
|
target_compile_definitions(pdfengine_smoke PRIVATE TEST_CORPUS_DIR="${TEST_CORPUS_DIR_NORM}")
|
|
|
|
|
|
2026-05-15 10:39:16 +05:30
|
|
|
pdfengine_set_warnings(pdfengine_smoke)
|
|
|
|
|
pdfengine_enable_sanitizers(pdfengine_smoke)
|
|
|
|
|
|
|
|
|
|
# Registers each TEST() with CTest so `ctest --preset ...` runs them.
|
|
|
|
|
gtest_discover_tests(pdfengine_smoke)
|