ios - Xcode not showing OCMock verification errors in the source code -


when unit testing in xcode, if use ocunit stassertx methods, ochamcrest assertions or ocmockito, when of raise error can see xcode marks line in red in editor. however, ocmock xcode not show line in red, have check issues tab see test method failing. know way solve this? see verify line in red when verification failing.

thanks lot.

ocmock's verify method works throwing exception, can take advantage of.

stassertnothrows([mymock verify], @"unexpected!"); 

the stassertnothrows highlighted xcode if verify fails.

edit

a macro can make nicer:

#define stverify(mock) stassertnothrow([mock verify], @"mock failed verify") stverify(mymock); 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -