liangzai-cool / hamcrest

Automatically exported from code.google.com/p/hamcrest
0 stars 0 forks source link

For OCHamcrest, add NS_REQUIRES_NIL_TERMINATION #159

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
if is very easy when using matchers that require a nil terminated list to 
forget the nil.
Xcode has a macro that will check for nil, it is used by NSArray 
arrayWithObjects, for example.

All that is required is to add a macro like thus:

OBJC_EXPORT id<HCMatcher> HC_hasItems(id items, ...) 
NS_REQUIRES_NIL_TERMINATION;

This will signal a warning that will appear at compile time.

Original issue reported on code.google.com by r...@aurorafeint.com on 26 Aug 2011 at 7:01

GoogleCodeExporter commented 9 years ago
Thank you! This will be in the next release, and will be a big help.

Original comment by jon.m.r...@gmail.com on 2 Sep 2011 at 1:42