how to write expected failures? how to write expected failures? xcode xcode

how to write expected failures?


An "unexpected failure" is a thrown and unhandled exception. As opposed to a possibly expected failure, which is checked by an assertion.

OCUnit does not provide a way to mark tests as "do not run." Either comment them out (which leaves the risk of the test no longer compiling) or change the method name so it doesn't have a "test" prefix. For example, rename testSomething to XXXtestSomething. (This leaves the risk that you'll forget to change it back.)


One solution to my problem is using the warning preprocessor macro to mark unit tests that must be completed. That way after compiling unit tests I get a good overview of future work that must be done. This is shown in the warnings panel, hence it is much more attractive than just using TODO comments.

However I would rather like to have a total count of incomplete tests and finding out the meaning of the always "0 unexpected" count of my log reports.