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,7 +31,6 @@ 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") \
|
||||
@@ -43,5 +42,4 @@ constexpr unexpected<std::decay_t<E>> make_unexpected(E &&e)
|
||||
action; \
|
||||
} \
|
||||
do { \
|
||||
} while (0); \
|
||||
}
|
||||
} while (0)
|
||||
|
@@ -180,7 +180,7 @@ static bool copyScriptTemplates(const SuiteConf &suiteConf, const Utils::FilePat
|
||||
const Utils::FilePath testFile = destination.pathAppended("test" + extension);
|
||||
QTC_ASSERT(!testFile.exists(), return false);
|
||||
const Utils::expected_str<void> result = test.copyFile(testFile);
|
||||
QTC_ASSERT_EXPECTED(result, return false)
|
||||
QTC_ASSERT_EXPECTED(result, return false);
|
||||
|
||||
if (scripted)
|
||||
ok = suiteConf.ensureObjectMapExists();
|
||||
|
Reference in New Issue
Block a user