Wrong code coverage on of unit test

Posted by KamilPyc on Stack Overflow See other posts from Stack Overflow or by KamilPyc
Published on 2013-11-12T09:49:40Z Indexed on 2013/11/12 9:53 UTC
Read the original article Hit count: 232

Filed under:
|
|
|

I'm using code coverage for unit tests in Xcode. Everything is working except some special cases, for example protocol declaration shows wrong values.

If I have :

@protocol SomeProtocole <NSObject>

@property (nonatomic, readonly) NSObject *example;

@end

I will get 0% code coverage for this file. But I have unit test that is using class that conforms to that protocol.

Only solution I found so far is to filter code coverage raport to not include protocols. But I would like to see real values for protocols. Any one have some solution to fix it?

© Stack Overflow or respective owner

Related posts about ios

Related posts about xcode