Skip to content

Instantly share code, notes, and snippets.

@rustle
Created September 1, 2013 19:58
Show Gist options
  • Save rustle/6406932 to your computer and use it in GitHub Desktop.
Save rustle/6406932 to your computer and use it in GitHub Desktop.
Example of the kind of thorough checks you can do in asserts that would be too expensive to leave in production code
#if !defined(NS_BLOCK_ASSERTIONS)
#define RSTLSetOfStringsAssert(set) [set enumerateObjectsUsingBlock:^(id obj, BOOL *stop) { NSParameterAssert([obj isKindOfClass:[NSString class]]); }];
#else
#define RSTLSetOfStringsAssert(set)
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment