I have Grenning's book. On page 20 he has the output from a unity example. It shows no passing tests, just ". . ." for each passing test.
I downloaded the unity source and am running it in a simulator for my target processor. I see every test case listed - passing ones and failing ones.
I don't see any option I can define in unity.h that would only print out the failing test cases and the summary. I have a lot of tests and my stdout window is really cluttered right now.
Is that some magic handled by the generate test runner ruby script that I am not using (in the auto or extras directories)? Or is there a basic option I am missing.
This is representative of what my output looks like now
C:[path]\ut_main.c:80:test_fred_condition_foo:PASS
C:[path]\ut_main.c:85:test_fred_condition_bar:FAIL: Expected 1
C:[path]\ut_main.c:90:test_fred_condition_baz:PASS
C:[path]\ut_main.c:95:test_fred_condition_qux
-----------------------
4 Tests 1 Failures 0 Ignored
FAIL
I'd rather it be like:
.
C:[path]\ut_main.c:85:test_fred_condition_bar:FAIL: Expected 1
. .
-----------------------
4 Tests 1 Failures 0 Ignored
FAIL
I modified
UnityConcludeTest()
in unity.c to solve this problem.It was this:
I changed it to this
I also added UNITY_PRINT_EOL; at the beginning of
UnityTestResultsBegin
and UnityEnd (there was already one, I added another).That did the trick + it put a blank space between each message to make everything more readable.