How do I set-up XCTest unit testing with a Cocos2d-v3 / SpriteBuilder project? -


i using new spritebuilder (was cocosbuilder) , cocos2d-v3 build interactive book. normal practice code using unit tests , want project incorporate xctest.

so far have gone test navigator in xcode, hit '+' @ bottom , added test target per apple's documentation. xcode created test target , sample test class (just .m file failing unit test).

i commented out textexample, , hit command+u test - , failed compile...monumentally. bazillions of errors , warnings.

is there simple way solve this?

here did got me through (i'm still not convinced it's ideal i'm importing unnecessary files unit testing. please me out if know better way).

i followed instructions in entry on stackoverflow: http://www.cocos2d-iphone.org/forums/topic/adding-cocos2d-2-0-to-existing-iphone-project/

and got working. steps in there included adding cocos , spritebuilder files directly project, adding them compile sources, , adding number of header , user search paths.

the final errors around cocos2d.h , ccbreader.h (the spritebuilder class) not being found in custom classes. added #imports in each class pull them in explicitly , testing works. mentioned seems less ideal. drop note if know better way resolve that.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -