Skip to content

Instantly share code, notes, and snippets.

@raws
Created December 4, 2010 02:49
Show Gist options
  • Save raws/727858 to your computer and use it in GitHub Desktop.
Save raws/727858 to your computer and use it in GitHub Desktop.
/*
* Asserts to use in Objective-C method bodies
*/
#define NSAssert5(condition, desc, arg1, arg2, arg3, arg4, arg5) \
_NSAssertBody((condition), (desc), (arg1), (arg2), (arg3), (arg4), (arg5))
#define NSAssert4(condition, desc, arg1, arg2, arg3, arg4) \
_NSAssertBody((condition), (desc), (arg1), (arg2), (arg3), (arg4), 0)
#define NSAssert3(condition, desc, arg1, arg2, arg3) \
_NSAssertBody((condition), (desc), (arg1), (arg2), (arg3), 0, 0)
#define NSAssert2(condition, desc, arg1, arg2) \
_NSAssertBody((condition), (desc), (arg1), (arg2), 0, 0, 0)
#define NSAssert1(condition, desc, arg1) \
_NSAssertBody((condition), (desc), (arg1), 0, 0, 0, 0)
#define NSAssert(condition, desc) \
_NSAssertBody((condition), (desc), 0, 0, 0, 0, 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment