创建:2012年10月23日参照:
当在UnitTest时使用isMemberOfClass,会失败。
原因是:在你测试的F.app和test bundle. ocunit里面都包含了该类的实现文件。
解决方法是:将该类的实现文件从测试target中去掉即可。
The problem is likely that your view controller's .m file is included in both targets, the app and the test bundle. ocunit (and derivatives like Kiwi) uses a test harness that makes the classes included in the app available to tests without having to explicitly include their implementation.
Including both has given you two copies of the same class, which is why they have the same description but different memory addresses.
更为深层次的原因,还没有探究。
+++++