1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-28 02:34:27 +01:00

- happier with const (and more optimized on some compilers)

- better helper examples
- general purpose memory compare

git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@16 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
This commit is contained in:
mvandervoord
2009-02-19 03:30:45 +00:00
parent 3eeb7dd726
commit 24a56b0c38
7 changed files with 174 additions and 43 deletions

View File

@@ -64,6 +64,12 @@ void UnityAssertEqualString(const char *expected,
const char *msg,
const unsigned short lineNumber );
void UnityAssertEqualMemory(void *expected,
void *actual,
unsigned int length,
const char *msg,
const unsigned short lineNumber );
void UnityAssertFloatsWithin(const float delta,
const float expected,
const float actual,
@@ -193,6 +199,12 @@ void UnityIgnore(const char *message, const int line);
ABORT_IF_NECESSARY();
#define TEST_ASSERT_EQUAL_STRING(expected, actual) TEST_ASSERT_EQUAL_STRING_MESSAGE(expected, actual, NULL)
#define TEST_ASSERT_EQUAL_MEMORY_MESSAGE(expected, actual, len, message) \
Unity.TestFile=__FILE__; \
UnityAssertEqualMemory((expected), (actual), (len), (message), (unsigned short)__LINE__); \
ABORT_IF_NECESSARY();
#define TEST_ASSERT_EQUAL_MEMORY(expected, actual, len) TEST_ASSERT_EQUAL_MEMORY_MESSAGE(expected, actual, len, NULL)
#define TEST_FAIL(message) { Unity.TestFile=__FILE__; UnityFail((message), (unsigned short)__LINE__); TEST_ABORT(); }
#define TEST_IGNORE_MESSAGE(message) { Unity.TestFile=__FILE__; UnityIgnore((message), (unsigned short)__LINE__); TEST_ABORT(); }
#define TEST_IGNORE() TEST_IGNORE_MESSAGE(NULL)