Apply clang-format
This commit is contained in:
parent
2a9949ce77
commit
ab298b200f
|
@ -44,7 +44,7 @@ using PathValueType =
|
||||||
#else
|
#else
|
||||||
char
|
char
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
#ifdef CPP_UTILITIES_USE_STANDARD_FILESYSTEM
|
#ifdef CPP_UTILITIES_USE_STANDARD_FILESYSTEM
|
||||||
static_assert(std::is_same_v<typename std::filesystem::path::value_type, PathValueType>);
|
static_assert(std::is_same_v<typename std::filesystem::path::value_type, PathValueType>);
|
||||||
#endif
|
#endif
|
||||||
|
@ -99,7 +99,8 @@ inline
|
||||||
#else
|
#else
|
||||||
PathStringView
|
PathStringView
|
||||||
#endif
|
#endif
|
||||||
extractNativePath(NativePathStringView path) {
|
extractNativePath(NativePathStringView path)
|
||||||
|
{
|
||||||
#ifdef PLATFORM_WINDOWS
|
#ifdef PLATFORM_WINDOWS
|
||||||
auto res = convertUtf16LEToUtf8(reinterpret_cast<const char *>(path.data()), path.size() * 2);
|
auto res = convertUtf16LEToUtf8(reinterpret_cast<const char *>(path.data()), path.size() * 2);
|
||||||
return std::string(res.first.get(), res.second);
|
return std::string(res.first.get(), res.second);
|
||||||
|
|
|
@ -982,7 +982,9 @@ void ArgumentParserTests::testValueConversion()
|
||||||
occurrence.convertValues<int>();
|
occurrence.convertValues<int>();
|
||||||
CPPUNIT_FAIL("Expected exception");
|
CPPUNIT_FAIL("Expected exception");
|
||||||
} catch (const ParseError &failure) {
|
} 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 };
|
occurrence.path = { &arg };
|
||||||
try {
|
try {
|
||||||
|
@ -995,6 +997,8 @@ void ArgumentParserTests::testValueConversion()
|
||||||
occurrence.convertValues<int>();
|
occurrence.convertValues<int>();
|
||||||
CPPUNIT_FAIL("Expected exception");
|
CPPUNIT_FAIL("Expected exception");
|
||||||
} catch (const ParseError &failure) {
|
} 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()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,7 +178,8 @@ TestApplication::TestApplication(int argc, const char *const *argv)
|
||||||
}
|
}
|
||||||
// -> find source directory
|
// -> find source directory
|
||||||
if (auto testFilePathFromSrcDirRef = readTestfilePathFromSrcRef(); !testFilePathFromSrcDirRef.empty()) {
|
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
|
// -> try testfiles directory in working directory
|
||||||
m_testFilesPaths.emplace_back("./testfiles/");
|
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."
|
<< "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;
|
<< Phrases::End << "Referenced source directory: " << testfilesPath << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue