Make it more clear that each test of the internal heap implementation
should free in LIFO order. Without this check, memory can be stranded
but still pass.
I believe if realloc() returns a pointer to a different location, the old location is freed. However, the pointer 'n1' is not freed if realloc fails to obtain a large enough block of memory and returns NULL. (more details on [StackOverflow](http://stackoverflow.com/a/16676964)).
[../Unity-master/extras/fixture/test/unity_fixture_Test.c:530]: (error) Deallocating a deallocated pointer: n1
This solution from Daniel Fischer was helpful in fixing the error because if realloc returns a pointer to a different location, the old location is freed.
Found by https://github.com/bryongloden/cppcheck
By removing the call to the Conclude function the code is simplified
and doesn't depend on global state updates. Tests that are ignored
after the testBody is called still output the right EOL.
This fixes#168. See that github.com issue for more discussion.
Allows the tests to build when putchar() is defined as a macro
with parenthesis around it, as in the ARM embedded gcc compiler.
There was already some space reserved as a guard, added check for writes
before the beginning of the buffer. Did not change the 'overrun' message.
Underrun buffer writes are likely to be a more rare case.
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.
Revert part of commit 77af37ad, code looked like a temporary change
The behavior is back to the original, printing "....!..." in quiet mode
Added an ignored test to Fixture for visual inspection
At the start of unity_free(), check mem for NULL, and return immediately
if it is, so we don't crash in this case. This mimics the behaviour of
most free() implementations. Closes#135.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Likewise, place all function prototypes before statements.
These changes support Microsoft Visual Studio 2008 Express Edition,
which follows C89-style rules.
- fixed a few bugs in fixtures to get it to pass against our standard compilers
- added extern of OUTPUT_CHAR method to keep compilers from complaining
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@107 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e