trying to convince myself of the benefits of unit testing and TDD I decided to include tests with my latest Cocos2D project. Getting the initial boiler-plate test up and running works fine, but alas, I have not been able to go very far after this. The test-rig balks at every single Cocos2D-class:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CCLayer", referenced from:
_OBJC_CLASS_$_NORControlLayer in NORControlLayer.o
"_OBJC_METACLASS_$_CCLayer", referenced from:
_OBJC_METACLASS_$_NORControlLayer in NORControlLayer.o
ld: symbol(s) not found for architecture i386
NORControlLayer being a subclass of CCLayer in the above example. Now, the obvious solution would be to simply link the CCLayer to the test-rig, but this seems to open up a hornet's nest with each added class demanding another tenfold of classes linked.
Is there a way to create a mock (or some other neat trick) to get the SenTestingKit to accept NORControlLayer and future Cocos2D-subclasses?
PS: I have actually gone so far as to include every single cocos2d-class as a target of the testkit, but wound up with more than a hundred similar errors...