I've started using Xcode4's SenTest unit testing facilities. It's been working pretty well, but ...
Xcode isn't offering code completion suggestions inside STAssert*()
macros.
I like to write simple expressions right into the assert, to save keystrokes and screen real estate:
STAssertTrue(mydoc.isInitialized, nil);
STAssertTrue(mydoc.pageCount == 2, nil);
The problem I'm having is that Xcode isn't offering code completion while I'm writing the expression inside the asserts.
This is a big bummer in the context of unit tests, where code completion can be a rapid and convenient way to remind yourself of the remaining properties and methods you need to write asserts for. Not to mention the usual benefits of completion.
So I've taken to writing my asserts like this, so I can get the code completion:
BOOL b = NO;
b = mydoc.isInitialized;
STAssertTrue(b, nil);
b = mydoc.pageCount == 2;
STAssertTrue(b, nil);
I'd really rather not have to do this kind of thing. It's more verbose, it's harder to read, and it makes Xcode's unit test failure messages less meaningful.
Any ideas? I've deleted my derived data dir, rebooted Xcode, cleaned, rebuilt, etc.