提交 8177f628 编写于 作者: M mkarlesky

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
上级 0cd87b0a
......@@ -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
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册