diff --git a/src/libs/utils/expected.h b/src/libs/utils/expected.h index 8302e85e535..943cfe5591f 100644 --- a/src/libs/utils/expected.h +++ b/src/libs/utils/expected.h @@ -31,17 +31,15 @@ constexpr unexpected> 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) diff --git a/src/plugins/squish/squishtesttreeview.cpp b/src/plugins/squish/squishtesttreeview.cpp index 7d46428666c..65e4c15dd93 100644 --- a/src/plugins/squish/squishtesttreeview.cpp +++ b/src/plugins/squish/squishtesttreeview.cpp @@ -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 result = test.copyFile(testFile); - QTC_ASSERT_EXPECTED(result, return false) + QTC_ASSERT_EXPECTED(result, return false); if (scripted) ok = suiteConf.ensureObjectMapExists();