I have some NSLog calls that I do to keep myself from flying blind in my unit tests. I can see them in the Build Results window, which works out nicely. Now I’d like to NOT run these except in the unit testing context (for instance, the target?). Is there a standard way to know if I’m inside a Unit Test or not?
I have some NSLog calls that I do to keep myself from flying blind
Share
I don’t know of a standard way, but you could define a preprocessor value in your test target and write your own log function to have the preprocessor strip the logging if that value is not defined.