Thursday, June 2, 2011

OCUnit issues

1. NSLog can be used from test cases, view output with .../Applications/Utilities/Console File->Open Console Log

2. Loading resources during unit testing doesn't work from mainBundle e.g. use:

NSString* path=[[NSBundle bundleForClass:[self class]] pathForResource:@"fname" ofType:@"plist"];

VS

NSString* path = [[NSBundle mainBundle] pathForResource:@"fname" ofType:@"plist"];


3. CGRectZero causes tests failure, CGRectMake(0, 0, 0, 0) does not.

No comments: