From ab298b200f81d107f76a681e6dace60f1f03780c Mon Sep 17 00:00:00 2001 From: Martchus Date: Sat, 11 Mar 2023 17:05:08 +0100 Subject: [PATCH] Apply clang-format --- io/path.h | 5 +++-- tests/argumentparsertests.cpp | 8 ++++++-- tests/testutils.cpp | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/io/path.h b/io/path.h index 3610b33..95ba915 100644 --- a/io/path.h +++ b/io/path.h @@ -44,7 +44,7 @@ using PathValueType = #else char #endif - ; + ; #ifdef CPP_UTILITIES_USE_STANDARD_FILESYSTEM static_assert(std::is_same_v); #endif @@ -99,7 +99,8 @@ inline #else PathStringView #endif - extractNativePath(NativePathStringView path) { + extractNativePath(NativePathStringView path) +{ #ifdef PLATFORM_WINDOWS auto res = convertUtf16LEToUtf8(reinterpret_cast(path.data()), path.size() * 2); return std::string(res.first.get(), res.second); diff --git a/tests/argumentparsertests.cpp b/tests/argumentparsertests.cpp index a2bba20..918c955 100644 --- a/tests/argumentparsertests.cpp +++ b/tests/argumentparsertests.cpp @@ -982,7 +982,9 @@ void ArgumentParserTests::testValueConversion() occurrence.convertValues(); CPPUNIT_FAIL("Expected exception"); } catch (const ParseError &failure) { - TESTUTILS_ASSERT_LIKE_FLAGS("conversion error of top-level value", "Conversion of top-level value \"foo\" to type \".*\" failed: The character \"f\" is no valid digit."s, std::regex::extended, std::string(failure.what())); + TESTUTILS_ASSERT_LIKE_FLAGS("conversion error of top-level value", + "Conversion of top-level value \"foo\" to type \".*\" failed: The character \"f\" is no valid digit."s, std::regex::extended, + std::string(failure.what())); } occurrence.path = { &arg }; try { @@ -995,6 +997,8 @@ void ArgumentParserTests::testValueConversion() occurrence.convertValues(); CPPUNIT_FAIL("Expected exception"); } catch (const ParseError &failure) { - TESTUTILS_ASSERT_LIKE_FLAGS("conversion error of argument value", "Conversion of value \"foo\" \\(for argument --test\\) to type \".*\" failed: The character \"f\" is no valid digit."s, std::regex::extended, std::string(failure.what())); + TESTUTILS_ASSERT_LIKE_FLAGS("conversion error of argument value", + "Conversion of value \"foo\" \\(for argument --test\\) to type \".*\" failed: The character \"f\" is no valid digit."s, + std::regex::extended, std::string(failure.what())); } } diff --git a/tests/testutils.cpp b/tests/testutils.cpp index b750afa..5ecb66b 100644 --- a/tests/testutils.cpp +++ b/tests/testutils.cpp @@ -178,7 +178,8 @@ TestApplication::TestApplication(int argc, const char *const *argv) } // -> find source directory if (auto testFilePathFromSrcDirRef = readTestfilePathFromSrcRef(); !testFilePathFromSrcDirRef.empty()) { - m_testFilesPaths.insert(m_testFilesPaths.end(), std::make_move_iterator(testFilePathFromSrcDirRef.begin()), std::make_move_iterator(testFilePathFromSrcDirRef.end())); + m_testFilesPaths.insert(m_testFilesPaths.end(), std::make_move_iterator(testFilePathFromSrcDirRef.begin()), + std::make_move_iterator(testFilePathFromSrcDirRef.end())); } // -> try testfiles directory in working directory m_testFilesPaths.emplace_back("./testfiles/"); @@ -646,7 +647,6 @@ std::vector TestApplication::readTestfilePathFromSrcRef() << "The source directory referenced by the file \"srcdirref\" does not contain a \"testfiles\" directory or does not exist." << Phrases::End << "Referenced source directory: " << testfilesPath << endl; } - } return res;