1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-23 00:15:58 +01:00

Add TEST_MESSAGE for outputting messages without aborting a test and _MESSAGE variant to TEST_PASS collection.

This commit is contained in:
Mark VanderVoord
2019-07-06 11:02:32 -04:00
parent a54d58a8fd
commit 0000f1e6d2
5 changed files with 59 additions and 2 deletions

View File

@@ -147,6 +147,28 @@ void testPassShouldEndImmediatelyWithPass(void)
TEST_FAIL_MESSAGE("We should have passed already and finished this test");
}
void testPassShouldEndImmediatelyWithPassAndMessage(void)
{
TEST_PASS_MESSAGE("Woohoo! This Automatically Passes!");
TEST_FAIL_MESSAGE("We should have passed already and finished this test");
}
void testMessageShouldDisplayMessageWithoutEndingAndGoOnToPass(void)
{
TEST_MESSAGE("This is just a message");
TEST_MESSAGE("This is another message");
TEST_PASS();
}
void testMessageShouldDisplayMessageWithoutEndingAndGoOnToFail(void)
{
TEST_MESSAGE("This is yet another message");
EXPECT_ABORT_BEGIN
TEST_FAIL();
VERIFY_FAILS_END
}
void testTrue(void)
{
TEST_ASSERT(1);