I’m trying to create a simple test macro but I’m having errors in the following lines. ANy of you knows why or how I can I fix them?
#define test(condition) do{\
if (condition)
{\ //// <-----Expected identifier or (
NSlog @"passed: " %@ #condtion); \
}
else
{\
NSLog(@"failed: " @ #condition); \
}
} //// <-----extraneous closing brace ( "}")
You need a backslash at the end of every line of your multi-line macro (except the last).