Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/121.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 猕猴桃存根是';与NSNumber一起工作,以SIGKILL结束_Ios_Objective C_Tdd_Kiwi - Fatal编程技术网

Ios 猕猴桃存根是';与NSNumber一起工作,以SIGKILL结束

Ios 猕猴桃存根是';与NSNumber一起工作,以SIGKILL结束,ios,objective-c,tdd,kiwi,Ios,Objective C,Tdd,Kiwi,我不确定我是否做得对,但我正在尝试在核心数据对象上存根NSNumber属性 下面是我的测试示例: it(@"should say 1 / ? with 1 point", ^{ mockCard = [KWMock nullMockForClass:[Card class]]; [mockCard stub:@selector(points) andReturn:[NSNumber numberWithInt:1]];

我不确定我是否做得对,但我正在尝试在核心数据对象上存根NSNumber属性

下面是我的测试示例:

   it(@"should say 1 / ? with 1 point", ^{
            mockCard = [KWMock nullMockForClass:[Card class]];
            [mockCard stub:@selector(points) andReturn:[NSNumber numberWithInt:1]];
            controller.card = mockCard;
            [[controller.lblCount.text should] equal:@"1 / ?"];     
   });
和我的源代码:

 -(void)setCard:(Card *)aCard{
     if ([card.points intValue] == 1) {
          lblCount.text = @"1 / ?";
     }
 }
运行此操作会导致
writeObjectValueToInvocationReturnValue
方法中出现
SIGKIL
错误

我错过什么了吗

更新 试图将存根更改为:

[mockCard stub:@selector(points) andReturn:theValue(1)]
...

 [FAILED], wrapped stub value type (i) could not be converted to the target type (v)

这是Kiwi中的一个bug,如下所述:

404,这就是为什么你不应该只发布链接。github repo已被移动:问题现在位于: