ios - NSObject +(BOOL)isSubclassOfClass: method returning wrong result -
I have three categories:. ClassA, ClassB and ClassC
ClassC ClassB inherited from Classa.
]);
This gives wrong.
XCTAssertTrue ([Classy Hashbys of Class: [Classes Class]]);
Returns are correct.
[class class class] superclus]
return classab.
Also note that when I give this truth in the test [ClassC isSubclassOfClass: [ClassB class]]
console, even when I test this unit immediately in my unit test The code returns false to test already!
Can anyone explain how this can happen?
I tried to suggest Brian with comments. I get logging in with my unit test:
0x102a8c4e0 0x110d21820
Logging in to the console:
0x102a8c4e0 0x102a8c4e0
It is possible that both of your application targets and your unit are added Some of the class has been the test goal.
Your class should only be added to the app target.
From your editing, it seems that this is the classbie
which is on the error - but it is worth three of them all to check.
SenTest / XCTest comes in classes included in available for app testing without tapping a test that clearly use to incorporate their implementation.
Both have given you duplicate classes, which is why they have separate memory addresses.
Comments
Post a Comment