From 81cf5eb6268d60566d610e19daee205d84875578 Mon Sep 17 00:00:00 2001 From: jsalling Date: Tue, 15 Dec 2015 17:32:55 -0600 Subject: [PATCH] Do not add EOL after every ignored test using Unity Fixture Revert part of commit 77af37ad, code looked like a temporary change The behavior is back to the original, printing "....!..." in quiet mode Added an ignored test to Fixture for visual inspection --- extras/fixture/src/unity_fixture.c | 6 +++--- extras/fixture/test/unity_fixture_Test.c | 4 ++++ extras/fixture/test/unity_fixture_TestRunner.c | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/extras/fixture/src/unity_fixture.c b/extras/fixture/src/unity_fixture.c index 57009dc..240661f 100644 --- a/extras/fixture/src/unity_fixture.c +++ b/extras/fixture/src/unity_fixture.c @@ -398,10 +398,10 @@ void UnityConcludeFixtureTest(void) { if (Unity.CurrentTestIgnored) { - //if (UnityFixture.Verbose) - //{ + if (UnityFixture.Verbose) + { UNITY_PRINT_EOL(); - //} + } Unity.TestIgnores++; } else if (!Unity.CurrentTestFailed) diff --git a/extras/fixture/test/unity_fixture_Test.c b/extras/fixture/test/unity_fixture_Test.c index 27652f6..af70934 100644 --- a/extras/fixture/test/unity_fixture_Test.c +++ b/extras/fixture/test/unity_fixture_Test.c @@ -277,6 +277,10 @@ TEST(UnityCommandOptions, UnknownCommandIsIgnored) TEST_ASSERT_EQUAL(98, UnityFixture.RepeatCount); } +IGNORE_TEST(UnityCommandOptions, TestShouldBeIgnored) +{ + TEST_FAIL_MESSAGE("This test should not run!"); +} //------------------------------------------------------------ diff --git a/extras/fixture/test/unity_fixture_TestRunner.c b/extras/fixture/test/unity_fixture_TestRunner.c index 28d8e56..6c1a90c 100644 --- a/extras/fixture/test/unity_fixture_TestRunner.c +++ b/extras/fixture/test/unity_fixture_TestRunner.c @@ -32,6 +32,7 @@ TEST_GROUP_RUNNER(UnityCommandOptions) RUN_TEST_CASE(UnityCommandOptions, MultipleOptions); RUN_TEST_CASE(UnityCommandOptions, MultipleOptionsDashRNotLastAndNoValueSpecified); RUN_TEST_CASE(UnityCommandOptions, UnknownCommandIsIgnored); + RUN_TEST_CASE(UnityCommandOptions, TestShouldBeIgnored); } TEST_GROUP_RUNNER(LeakDetection) -- GitLab