mercredi 29 avril 2015

How to stub CocoaLumberjack or NSLog with OCMockito

I can stub/verify a class method, but I'm having difficulty with defined macros. I'm trying to test that one of my methods calls DDLogInfo.

It's defined like so in the CocoaLumberjack source

#define DDLogInfo(frmt, ...)    LOG_MAYBE(LOG_ASYNC_ENABLED, LOG_LEVEL_DEF, DDLogFlagInfo,    0, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)

thanks!

Aucun commentaire:

Enregistrer un commentaire