Commit 7636e999 authored by math's avatar math
Browse files

[FIX #61,#64] There was a bug inside the new CXXTEST_ADD_TESTS_FROM_LIST...

[FIX #61,#64] There was a bug inside the new CXXTEST_ADD_TESTS_FROM_LIST macro: local variables are not reset inside macros, use functions instead! Also the hpp files were added so their unit tests run through too
parent 024fa993
ADD_SUBDIRECTORY( io )
ADD_SUBDIRECTORY( exceptions )
FILE( GLOB DATAHANDLER_SRC "*.cpp" )
FILE( GLOB DATAHANDLER_SRC "*.cpp" "*.hpp" )
FILE( GLOB DATAHANDLER_EXCEPTIONS_SRC "exceptions/*.cpp" )
ADD_LIBRARY( dataHandler SHARED ${DATAHANDLER_SRC} ${DATAHANDLER_EXCEPTIONS_SRC} )
......
......@@ -128,11 +128,7 @@ endmacro(CXXTEST_ADD_TEST)
# 3. finally they are linked with all libs present in parameter B
# 4. If there are more arguments (ARGN) then they are exclude from A before 1-3 starts)
#
MACRO( CXXTEST_ADD_TESTS_FROM_LIST _SourceLst _TestLbs )
# transform parameters into variables, since macro parameters aren't variables
SET( _SourceList ${_SourceLst} )
SET( _TestLibs ${_TestLbs} )
FUNCTION( CXXTEST_ADD_TESTS_FROM_LIST _SourceList _TestLibs )
# remove unwanted tests
IF( ${ARGC} GREATER 2 )
FOREACH( fname ${ARGN} )
......@@ -166,7 +162,7 @@ MACRO( CXXTEST_ADD_TESTS_FROM_LIST _SourceLst _TestLbs )
MESSAGE( STATUS "WARNING: Skipping ${_ClassName}, no unit test available." )
ENDIF()
ENDFOREACH( _ClassName )
ENDMACRO( CXXTEST_ADD_TESTS_FROM_LIST )
ENDFUNCTION( CXXTEST_ADD_TESTS_FROM_LIST )
#=============================================================
# main()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment