From 822cce1ef79507a7a0121a4cb0267b3a04a95c9b Mon Sep 17 00:00:00 2001 From: Patrick Valsecchi Date: Wed, 4 Feb 2015 09:30:24 +0100 Subject: More tolerant when parsing GPS coordinates. Refactored the parsing logic to make it more solid (no more guessing) and more flexible (support more formats). Added a test for checking that. Fixed a few warnings. [Dirk Hohndel: some changes to coding style] Signed-off-by: Patrick Valsecchi Signed-off-by: Dirk Hohndel --- CMakeLists.txt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c8cad1bb..4a260e729 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -235,11 +235,13 @@ ADD_DEPENDENCIES(subsurface_interface subsurface_generated_ui) ADD_DEPENDENCIES(subsurface_generated_ui version) ADD_DEPENDENCIES(subsurface_corelib version) -ENABLE_TESTING() -ADD_EXECUTABLE(TestUnitConversion tests/testunitconversion.cpp) -TARGET_LINK_LIBRARIES(TestUnitConversion subsurface_corelib ${QT_TEST_LIBRARIES} ${SUBSURFACE_LINK_LIBRARIES} -lzip -ldivecomputer) -ADD_TEST(NAME TestUnitConversion COMMAND TestUnitConversion) +MACRO(test NAME FILE) + ADD_EXECUTABLE(${NAME} tests/${FILE}) + TARGET_LINK_LIBRARIES(${NAME} subsurface_corelib ${QT_TEST_LIBRARIES} ${SUBSURFACE_LINK_LIBRARIES} -lzip -ldivecomputer) + ADD_TEST(NAME ${NAME} COMMAND ${NAME}) +ENDMACRO() -ADD_EXECUTABLE(TestProfile tests/testprofile.cpp) -TARGET_LINK_LIBRARIES(TestProfile subsurface_corelib ${QT_TEST_LIBRARIES} ${SUBSURFACE_LINK_LIBRARIES} -lzip -ldivecomputer) -ADD_TEST(NAME TestProfile COMMAND TestProfile) +ENABLE_TESTING() +test(TestUnitConversion testunitconversion.cpp) +test(TestProfile testprofile.cpp) +test(TestGpsCoords testgpscoords.cpp) -- cgit v1.2.3-70-g09d2