开发者

How do I access the properties of my object using STAssertTrue

开发者_开发知识库

How do I access the properties of my object using STAssertTrue in unit tests?

I don't have access to the properties of my object and I want to do a comparison?


You can access object properties as usual, so I guess you are talking about missing code completion... I think is an xcode bug, if you want code completion, you have to type before a call to STAssertTrue() (or any others OCUnit macro), like:

NSString *foo = [myObject fooString];
STAssertTrue([foo length] > 1, nil);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜