Tag Archives: SenTestingKit

iPhone Unit Test Coverage

have a look at the CoverStory Howto,
download CoverStory,
open (with XCode) the XCode Project you want to measure,
run the script EnableGCov.scpt linked to from the howto,
run your tests and see a linker error, – dead end for the time being. http://groups.google.com/group/coverstory-discuss/browse_thread/thread/fbcbf5ed61d8d02b#

CocoaHeads Vortrag gestern: Unit Testing

um ein wenig anzugeben und schlicht den Link hier zu platzieren:

Cocoa Unit Testing Folien,
Cocoa Unit Testing Wiki Seite

NSDateFormatter case sensitive trap

Though NSDateFormatter behaves slightly different than documented, the following might even be correct, as strange as it might look (mind the last two lines):
-(void)testNSDateFormatterTrap
{
NSDateFormatter *lower = init] autorelease];
lower.dateFormat = @”yyyy-MM-dd HH:mm:SS ZZZ”;

NSDateFormatter *upper = init] autorelease];

Upgrade to Snow Leopard

Mac OS X 10.6 Snow Leopard (partition 25G, HFS+ Journaled, Upper/Lower)
Mac OS X 10.5 Leopard (partition 25G, HFS+ Journaled, Upper/Lower)
partition userspace 100G, HFS+ Journaled, Upper/Lower
$ cat /etc/fstab
# mount partition “userspace” as /Users
UUID=D016E3FD-E322-3006-A8F5-D2348C6A5B7B /Users hfs rw,auto

create user “mig”
TimeMachine restore Users + Settings
delete user “mig”
manually copy user “Shared”
iPhone SDK 3.1.2 + XCode 3.2.1
modgenerator 1.5 plus trick
$ ln -s /Developer/usr/bin/momc …

NSDateFormatter & Http Header

Ever tried to get e.g. the “Last-Modified” HTTP response header field into a NSDate object? That’s no real fun, because

this standard formatting isn’t digested by default,
the required format string doesn’t quite work as documented.

Let’s concentrate on “Full Date” according to RFC 1123:
NSString *src = @”Fri, 14 Aug 2009 14:45:31 GMT”;
The NSDateFormatter switched to Unicode …

Unit Testing / iPhone

Having Eclipse & JUnit in mind I missed unit testing quite a bit while developing with XCode for iPhone.

As a first shot, I set SenTestingKit up as explained by it’s author and it works really nicely. One thing I still miss is Step’n'Trace debugging the tests.

Other intros to the topic from Apple about OCUnit …