mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-06-20 05:50:29 +08:00
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:
@ -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()
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user