mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Replace Boost PP_Iterate by C++11 variadic templates
This allows support for any number of arguments and makes setting MOCK_MAX_ARGS unnecessary. It also allows for easier debugging due to being able to step into actual code instead of preprocessor generated stuff
This commit is contained in:
parent
90d9ac8055
commit
fca30e7780
17 changed files with 368 additions and 472 deletions
|
|
@ -40,7 +40,7 @@ set(testsUsingUndefinedCPP test_function test_integration)
|
|||
foreach(testFile IN LISTS testFiles)
|
||||
get_filename_component(name ${testFile} NAME_WE)
|
||||
|
||||
foreach(testVariant IN ITEMS "" _max_args _use_conversions _thread_safe)
|
||||
foreach(testVariant IN ITEMS "" _use_conversions _thread_safe)
|
||||
set(curName ${name}${testVariant})
|
||||
add_executable(${curName} ${testFile})
|
||||
if(name IN_LIST testsUsingUndefinedCPP)
|
||||
|
|
@ -50,7 +50,6 @@ foreach(testFile IN LISTS testFiles)
|
|||
add_test(NAME ${curName} COMMAND ${curName})
|
||||
endforeach()
|
||||
|
||||
target_compile_definitions(${name}_max_args PRIVATE MOCK_MAX_ARGS=21)
|
||||
target_compile_definitions(${name}_use_conversions PRIVATE MOCK_USE_CONVERSIONS)
|
||||
|
||||
target_link_libraries(${name}_thread_safe PRIVATE Boost::thread)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue