1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-28 10:44:26 +01:00

Add configuration option UNITY_EXCLUDE_STDLIB_MALLOC to Fixture

This feature removes the dependency on malloc/free for constrained
  embedded systems without a heap. It uses a static heap inside
  Unity Fixture. Setting UNITY_INTERNAL_HEAP_SIZE_BYTES sizes the heap.
 Add tests for new option, add targets to makefile for running tests.
 UNITY_FIXTURE_MALLOC for Fixture use only, remove from unity_output_Spy.c.
This commit is contained in:
jsalling
2016-02-01 23:54:06 -06:00
parent ccb29e80c2
commit 955b221218
7 changed files with 139 additions and 15 deletions

View File

@@ -41,3 +41,11 @@ TEST_GROUP_RUNNER(LeakDetection)
RUN_TEST_CASE(LeakDetection, BufferOverrunFoundDuringFree);
RUN_TEST_CASE(LeakDetection, BufferOverrunFoundDuringRealloc);
}
TEST_GROUP_RUNNER(InternalMalloc)
{
RUN_TEST_CASE(InternalMalloc, MallocPastBufferFails);
RUN_TEST_CASE(InternalMalloc, CallocPastBufferFails);
RUN_TEST_CASE(InternalMalloc, MallocThenReallocGrowsMemoryInPlace);
RUN_TEST_CASE(InternalMalloc, ReallocFailDoesNotFreeMem);
}