made unity internally consistent with fail and ignore macros having/not having message parameters

git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@87 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
This commit is contained in:
mkarlesky
2010-07-30 22:39:52 +00:00
parent 0cd87b0a2e
commit 8177f62867
2 changed files with 6 additions and 5 deletions

View File

@ -54,7 +54,8 @@
// Basic Fail and Ignore
//-------------------------------------------------------
#define TEST_FAIL(message) UNITY_TEST_FAIL(__LINE__, message)
#define TEST_FAIL_MESSAGE(message) UNITY_TEST_FAIL(__LINE__, message)
#define TEST_FAIL() UNITY_TEST_FAIL(__LINE__, NULL)
#define TEST_IGNORE_MESSAGE(message) UNITY_TEST_IGNORE(__LINE__, message)
#define TEST_IGNORE() UNITY_TEST_IGNORE(__LINE__, NULL)
#define TEST_ONLY()

View File

@ -42,7 +42,7 @@ void setUp(void)
void tearDown(void)
{
if (SetToOneToFailInTearDown == 1)
TEST_FAIL("<= Failed in tearDown");
TEST_FAIL_MESSAGE("<= Failed in tearDown");
if ((SetToOneMeanWeAlreadyCheckedThisGuy == 0) && (Unity.CurrentTestFailed > 0))
{
UnityPrint("[[[[ Previous Test Should Have Passed But Did Not ]]]]");
@ -107,7 +107,7 @@ void testNotNotEqual(void)
void testFail(void)
{
EXPECT_ABORT_BEGIN
TEST_FAIL("Expected for testing");
TEST_FAIL_MESSAGE("Expected for testing");
VERIFY_FAILS_END
}
@ -142,7 +142,7 @@ void testIgnore(void)
{
EXPECT_ABORT_BEGIN
TEST_IGNORE();
TEST_FAIL("This should not be reached");
TEST_FAIL_MESSAGE("This should not be reached");
VERIFY_IGNORES_END
}
@ -150,7 +150,7 @@ void testIgnoreMessage(void)
{
EXPECT_ABORT_BEGIN
TEST_IGNORE_MESSAGE("This is an expected TEST_IGNORE_MESSAGE string!");
TEST_FAIL("This should not be reached");
TEST_FAIL_MESSAGE("This should not be reached");
VERIFY_IGNORES_END
}