ThrowTheSwitch / Unity

Simple Unit Testing for C
ThrowTheSwitch.org
MIT License
4.04k stars 972 forks source link

Test results incorrectly reported if last test is IGNORE_TEST #13

Closed JohnBreitenbach closed 11 years ago

JohnBreitenbach commented 11 years ago

With a list of 10 tests and the last test set to IGNORE_TEST, the results of the test are not reported properly:

Unity test run 1 of 1

.........!

10 Tests 0 Failures 0 Ignored OK

The "!" is correct, showing the last test ignored, but the final statistics are incorrect: 10/0/0 for pass/fail/ignore. Should be 10/0/1.

Reversing the order of the final two tests in the test runner yields proper results:

Unity test run 1 of 1

........!.

10 Tests 0 Failures 1 Ignored OK

Verified that the test is, in fact, ignored by inserting a TEST_FAIL into it. Have also verified that moving other tests into the last position creates the same issue. Issue is limited to the last test in the list.

sw17ch commented 11 years ago

There's more discussion of this issue on #14. I'm going to close this and handle the fix in #14.