mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
3fef6ec31d
We do some merging in a couple of the other tests as well, but the idea is to have specific test cases that exercise our merge logic. This one starts simple. Merge a dive with some valid info with a second one that has less data filled. And then try it in both possible orders. It shows a few potential problems. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
40 lines
1.1 KiB
CMake
40 lines
1.1 KiB
CMake
# QTest based tests
|
|
qt5_add_resources(SUBSURFACE_TEST_RESOURCES ../subsurface.qrc)
|
|
|
|
add_library(RESOURCE_LIBRARY STATIC ${SUBSURFACE_TEST_RESOURCES})
|
|
|
|
macro(TEST NAME FILE)
|
|
add_executable(${NAME} ${FILE} )
|
|
target_link_libraries(${NAME} subsurface_corelib RESOURCE_LIBRARY ${QT_TEST_LIBRARIES} ${SUBSURFACE_LINK_LIBRARIES} )
|
|
add_test(NAME ${NAME} COMMAND $<TARGET_FILE:${NAME}>)
|
|
endmacro()
|
|
|
|
enable_testing()
|
|
add_definitions(-g)
|
|
TEST(TestUnitConversion testunitconversion.cpp)
|
|
TEST(TestProfile testprofile.cpp)
|
|
TEST(TestGpsCoords testgpscoords.cpp)
|
|
TEST(TestParse testparse.cpp)
|
|
TEST(TestPlan testplan.cpp)
|
|
TEST(TestDiveSiteDuplication testdivesiteduplication.cpp)
|
|
TEST(TestRenumber testrenumber.cpp)
|
|
TEST(TestGitStorage testgitstorage.cpp)
|
|
TEST(TestPreferences testpreferences.cpp)
|
|
TEST(TestPicture testpicture.cpp)
|
|
TEST(TestMerge testmerge.cpp)
|
|
|
|
|
|
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}
|
|
DEPENDS
|
|
TestUnitConversion
|
|
TestProfile
|
|
TestGpsCoords
|
|
TestParse
|
|
TestGitStorage
|
|
TestPlan
|
|
TestDiveSiteDuplication
|
|
TestPreferences
|
|
TestRenumber
|
|
TestPicture
|
|
TestMerge
|
|
)
|