shunit2
shunit2 copied to clipboard
Rename assert skipping functions and add possibility to skip a test completely
Changes:
- The
*Skippingfunctions have been renamed to*SkippingAssertsto highlight that they are related to skipping asserts. The old functions are available for backwards compatibility but they print out a warning that they are deprecated. - The generated report is tweaked to indicate the number of failed test cases (failed tests=X), failed asserts (failed asserts=Y), and skipped asserts (skipped asserts=Z). This will make the generated report convey the number of failures and skipped asserts more clearly than before.
- New functionality: function
skipTestis introduced that allows all asserts and fails in a test to be skipped. This function must be called in the very beginning of the test case, and if it is called afterstartSkippingAssertsor any assert/fail function, it will fail the test case. Furthermore, it will print out a warning that the test is skipped, and all asserts and fails in the test case will be skipped without incrementing the assert counters. It will, however, increment a counter for skipped tests, which will be shown in the generated report (skipped tests=X).
The documentation and examples have been updated accordingly.