ARC, bridged cast and GHUnit

百般思念 提交于 2019-12-05 04:52:33
joseph.hainline

Since you are comparing an NSString, you should use the GHAssertNotNil check. See NULL vs nil in Objective-C for more info.

So your example should read:

NSString *string1 = @"a string";
GHAssertNotNil(string1, nil);

I've also noticed in my ARC projects using GHUnit that the GHUnit main.m file needs the

-fno-objc-arc

linker flag as was suggested previously.

You can exclude only GHUnit files from automatics referencing(ARC) from your project by going into Build Phase -> Compile Sources

and then double click on the files from GHUnit, a box will appear, paste following into it

-fno-objc-arc

This will exclude the files from GHUnit from automatics referencing(ARC).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!