Apply clang-format

This commit is contained in:
Martchus 2023-03-11 17:05:08 +01:00
parent 2a9949ce77
commit ab298b200f
3 changed files with 11 additions and 6 deletions

View File

@ -44,7 +44,7 @@ using PathValueType =
#else
char
#endif
;
;
#ifdef CPP_UTILITIES_USE_STANDARD_FILESYSTEM
static_assert(std::is_same_v<typename std::filesystem::path::value_type, PathValueType>);
#endif
@ -99,7 +99,8 @@ inline
#else
PathStringView
#endif
extractNativePath(NativePathStringView path) {
extractNativePath(NativePathStringView path)
{
#ifdef PLATFORM_WINDOWS
auto res = convertUtf16LEToUtf8(reinterpret_cast<const char *>(path.data()), path.size() * 2);
return std::string(res.first.get(), res.second);

View File

@ -982,7 +982,9 @@ void ArgumentParserTests::testValueConversion()
occurrence.convertValues<int>();
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<int>();
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()));
}
}

View File

@ -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<std::string> 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;