Update the extern C decalaration. Add __cpluplus block to unity_handler.h

and include that header in unity_handler.cpp.
Anna Bridge 2016-05-27 14:48:32 +01:00
parent 706e5a0473
commit 5e58036974
2 changed files with 9 additions and 2 deletions

View File

@ -18,16 +18,15 @@
#include "utest/harness.h"
#include "utest/stack_trace.h"
#include "utest/unity_handler.h"
extern "C"
void utest_unity_assert_failure(void)
{
UTEST_LOG_FUNCTION();
utest::v1::Harness::raise_failure(utest::v1::REASON_ASSERTION);
}
extern "C"
void utest_unity_ignore_failure(void)
{
UTEST_LOG_FUNCTION();

View File

@ -21,10 +21,18 @@
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/// this function is called from the unity module when an assertion failed.
void utest_unity_assert_failure(void);
/// this function is called from the unity module when an assertion failed, but is ignored.
void utest_unity_ignore_failure(void);
#ifdef __cplusplus
}
#endif
#endif // UTEST_UNITY_ASSERT_FAILURE_H