【发布时间】:2013-10-28 06:15:38
【问题描述】:
我一直试图弄清楚如何为使用 cocos2d 的游戏设置 OCUnit 单元测试。所以我最初按照这些说明设置了测试目标:http://blog.shalomfriss.com/?p=894
不幸的是,当我通过 Product > Test in Xcode. 运行测试时,下面的代码触发了一个信号SIGABRT 中断的函数似乎在[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.3 -
cocos2d2.1版
有谁知道如何解决这个问题,或者有没有更好的方法来使用 OCUnit 或任何其他测试框架来设置测试?
【问题讨论】:
标签: ios objective-c ipad cocos2d-iphone ocunit