mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-29 11:14:27 +01:00
- updates to fixture in extras (submitted by James Grenning)
git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@111 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
//- Copyright (c) 2010 James Grenning and Contributed to Unity Project
|
||||
/* ==========================================
|
||||
Unity Project - A Test Framework for C
|
||||
Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
|
||||
[Released under MIT License. Please refer to license.txt for details]
|
||||
========================================== */
|
||||
|
||||
#include "unity_fixture.h"
|
||||
|
||||
static void runAllTests()
|
||||
{
|
||||
RUN_TEST_GROUP(UnityFixture);
|
||||
RUN_TEST_GROUP(UnityCommandOptions);
|
||||
RUN_TEST_GROUP(LeakDetection)
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
return UnityMain(argc, argv, runAllTests);
|
||||
}
|
||||
|
||||
@@ -285,7 +285,6 @@ TEST(LeakDetection, DetectsLeak)
|
||||
UnityOutputCharSpy_Enable(1);
|
||||
EXPECT_ABORT_BEGIN
|
||||
UnityMalloc_EndTest();
|
||||
UnityPointer_UndoAllSets();
|
||||
EXPECT_ABORT_END
|
||||
UnityOutputCharSpy_Enable(0);
|
||||
CHECK(strstr(UnityOutputCharSpy_Get(), "This test leaks!"));
|
||||
@@ -303,7 +302,6 @@ TEST(LeakDetection, BufferOverrunFoundDuringFree)
|
||||
free(m);
|
||||
EXPECT_ABORT_END
|
||||
UnityOutputCharSpy_Enable(0);
|
||||
UnityPointer_UndoAllSets();
|
||||
CHECK(strstr(UnityOutputCharSpy_Get(), "Buffer overrun detected during free()"));
|
||||
Unity.CurrentTestFailed = 0;
|
||||
}
|
||||
@@ -318,8 +316,6 @@ TEST(LeakDetection, BufferOverrunFoundDuringRealloc)
|
||||
m = realloc(m, 100);
|
||||
EXPECT_ABORT_END
|
||||
UnityOutputCharSpy_Enable(0);
|
||||
UnityPointer_UndoAllSets();
|
||||
CHECK(strstr(UnityOutputCharSpy_Get(), "Buffer overrun detected during realloc()"));
|
||||
free(m);
|
||||
Unity.CurrentTestFailed = 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user