forked from qt-creator/qt-creator
Utils: Enforce use of semicolon after QTC_ASSERT_EXPECTED
Change-Id: I2fe6b60434f251e4abf7a13a535844a10f99c6a3 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -31,17 +31,15 @@ constexpr unexpected<std::decay_t<E>> make_unexpected(E &&e)
|
||||
|
||||
//! If 'expected' has an error the error will be printed and the 'action' will be executed.
|
||||
#define QTC_ASSERT_EXPECTED(expected, action) \
|
||||
{ \
|
||||
if (Q_LIKELY(expected)) { \
|
||||
} else { \
|
||||
::Utils::writeAssertLocation(QString("%1:%2: %3") \
|
||||
.arg(__FILE__) \
|
||||
.arg(__LINE__) \
|
||||
.arg(expected.error()) \
|
||||
.toUtf8() \
|
||||
.data()); \
|
||||
action; \
|
||||
} \
|
||||
do { \
|
||||
} while (0); \
|
||||
}
|
||||
if (Q_LIKELY(expected)) { \
|
||||
} else { \
|
||||
::Utils::writeAssertLocation(QString("%1:%2: %3") \
|
||||
.arg(__FILE__) \
|
||||
.arg(__LINE__) \
|
||||
.arg(expected.error()) \
|
||||
.toUtf8() \
|
||||
.data()); \
|
||||
action; \
|
||||
} \
|
||||
do { \
|
||||
} while (0)
|
||||
|
||||
Reference in New Issue
Block a user