我一直在想如何为我的游戏设置OCUnit
单元测试,使用cocos2d。所以我跟着这些指示成立最初的测试目标:http://blog.shalomfriss.com/?p=894如何为cocos2d应用程序设置单元测试?
不幸的是,下面的代码触发信号SIGABRT
当我运行通过产品测试>测试在Xcode.
它打破了功能似乎是在[CCGLProgram compileShader:type:byteArray:]
@implementation GameTests
- (void)setUp
{
[super setUp];
}
- (void)tearDown
{
// Tear-down code here.
[super tearDown];
}
- (void)testExample
{
STAssertNotNil([InitialLayer scene], @"initial layer scene was null.");
}
@end
这是InitialLayer现场方法:
+(CCScene *) scene
{
CCScene *scene = [CCScene node];
InitialLayer*layer = [InitialLayernode];
[scene addChild: layer];
return scene;
}
一些其他可能相关的信息:
- 目标设备:iPad的6.1
xcode
版本:4.6.3cocos2d
版本2.1
有谁知道如何解决这个问题还是有更好的办法,一般设置测试使用OCUnit或任何其他测试框架?