Skip to content

Instantly share code, notes, and snippets.

@amattn
Created September 1, 2011 23:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amattn/1187616 to your computer and use it in GitHub Desktop.
Save amattn/1187616 to your computer and use it in GitHub Desktop.
Objective C Macro of the week: ASSERT_IS_CLASS
#define ASSERT_IS_CLASS(x, class) NSAssert5([x isKindOfClass:class], @"\n\n **** Unexpected Assertion **** \nReason: Expected class:%@ but got:%@\nAssertion in file:%s at line %i in Method %@", NSStringFromClass(class), x, __FILE__, __LINE__, NSStringFromSelector(_cmd))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment