1
0

Require semi-colon at end of function-like macros (#4719)

This commit is contained in:
peterbell10
2020-05-05 21:39:59 +01:00
committed by GitHub
parent f4b5c4c341
commit 8e2dfce84b
4 changed files with 100 additions and 79 deletions

View File

@@ -53,11 +53,14 @@ public:
#define EXPECT(X) if (!(X)) \
{ \
ASSERT(X); \
throw cTestFailure(#X, __FILE__, __LINE__); \
}
#define EXPECT(X) \
do { \
if (!(X)) \
{ \
ASSERT(X); \
throw cTestFailure(#X, __FILE__, __LINE__); \
} \
} while (false)