chore: Add unit tests for DocumentContextReader (#90)

chore: Add unit tests for DocumentContextReader

The tests are based on GTest like some tests in Qt Creator itself, which
makes it easy to run as full Qt Creator does not need to be started.
This commit is contained in:
Povilas Kanapickas
2025-03-05 16:01:52 +02:00
committed by GitHub
parent bcf7b6c226
commit 247256d4a4
5 changed files with 239 additions and 2 deletions

14
test/CMakeLists.txt Normal file
View File

@ -0,0 +1,14 @@
add_executable(QodeAssistTest
DocumentContextReaderTest.cpp
unittest_main.cpp
)
target_link_libraries(QodeAssistTest PRIVATE
Qt::Core
GTest::GTest
GTest::Main
QtCreator::LanguageClient
Context
)
add_test(NAME QodeAssistTest COMMAND QodeAssistTest)