Skip to content

Commit

Permalink
Merge pull request #899 from bukulin/master
Browse files Browse the repository at this point in the history
Compilation fixes for OpenBSD-5.8
  • Loading branch information
basvodde committed Mar 13, 2016
2 parents 058b516 + 36e9c6a commit 2f4f492
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions tests/CMakeLists.txt
Expand Up @@ -44,6 +44,12 @@ if (MINGW)
set(THREAD_LIB "pthread")
endif (MINGW)

if (${CMAKE_HOST_SYSTEM_NAME} MATCHES "OpenBSD")
set (THREADS_HAVE_PTHREAD_ARG 1)
find_package (Threads REQUIRED)
set (THREAD_LIB "pthread")
endif ()

add_executable(CppUTestTests ${CppUTestTests_src})
cpputest_set_test_output_location(CppUTestTests "${CMAKE_BINARY_DIR}/tests")
target_link_libraries(CppUTestTests CppUTest ${THREAD_LIB})
Expand Down
6 changes: 3 additions & 3 deletions tests/CppUTestExt/MockSupport_cTestCFile.c
Expand Up @@ -57,7 +57,7 @@ void all_mock_support_c_calls(void)
withPointerParameters("pointer", (void*) 1)->
withConstPointerParameters("constpointer", (const void*) 1)->
withFunctionPointerParameters("functionpointer", (void(*)()) 1)->
withMemoryBufferParameter("name", (void*) 1, 0)->
withMemoryBufferParameter("name", (void*) 1, 0UL)->
ignoreOtherParameters();

mock_c()->actualCall("boo")->withIntParameters("integer", 1)->
Expand All @@ -69,12 +69,12 @@ void all_mock_support_c_calls(void)
withPointerParameters("pointer", (void*) 1)->
withConstPointerParameters("constpointer", (const void*) 1)->
withFunctionPointerParameters("functionpointer", (void(*)()) 1)->
withMemoryBufferParameter("name", (void*) 1, 0)->
withMemoryBufferParameter("name", (void*) 1, 0UL)->
hasReturnValue();

mock_c()->disable();
mock_c()->expectOneCall("boo")->withParameterOfType("type", "name", (void*) 1)->
withOutputParameterReturning("name", (void*)1, 0)->
withOutputParameterReturning("name", (void*)1, 0UL)->
withOutputParameterOfTypeReturning("type", "name", (void*)1);
mock_c()->actualCall("boo")->withParameterOfType("type", "name", (void*) 1)->
withOutputParameter("name", (void*)1)->
Expand Down

0 comments on commit 2f4f492

Please sign in to comment.