From 9cdc3d678b1c2b3bb1b60478f59cbf5a456c1a70 Mon Sep 17 00:00:00 2001 From: jsalling Date: Wed, 18 Jan 2017 08:43:29 -0600 Subject: [PATCH] Option to exclude CppUTest compatibility asserts --- extras/fixture/src/unity_fixture.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extras/fixture/src/unity_fixture.h b/extras/fixture/src/unity_fixture.h index e992b99..6f8d623 100644 --- a/extras/fixture/src/unity_fixture.h +++ b/extras/fixture/src/unity_fixture.h @@ -65,6 +65,7 @@ int UnityMain(int argc, const char* argv[], void (*runAllTests)(void)); TEST_##group##_GROUP_RUNNER(); } /* CppUTest Compatibility Macros */ +#ifndef UNITY_EXCLUDE_CPPUTEST_ASSERTS /* Sets a pointer and automatically restores it to its old value after teardown */ #define UT_PTR_SET(ptr, newPointerValue) UnityPointer_Set((void**)&(ptr), (void*)(newPointerValue), __LINE__) #define TEST_ASSERT_POINTERS_EQUAL(expected, actual) TEST_ASSERT_EQUAL_PTR((expected), (actual)) @@ -74,6 +75,7 @@ int UnityMain(int argc, const char* argv[], void (*runAllTests)(void)); #define LONGS_EQUAL(expected, actual) TEST_ASSERT_EQUAL_INT((expected), (actual)) #define STRCMP_EQUAL(expected, actual) TEST_ASSERT_EQUAL_STRING((expected), (actual)) #define DOUBLES_EQUAL(expected, actual, delta) TEST_ASSERT_DOUBLE_WITHIN((delta), (expected), (actual)) +#endif /* You must compile with malloc replacement, as defined in unity_fixture_malloc_overrides.h */ void UnityMalloc_MakeMallocFailAfterCount(int count);