Apply clang-format

charconv
Martchus 3 years ago
parent a383d7dac5
commit 4e3393ee72
  1. 4
      conversion/stringconversion.h
  2. 9
      tests/iotests.cpp

@ -249,7 +249,7 @@ template <typename StringType> bool endsWith(const StringType &str, const String
if (str.size() < phrase.size()) {
return false;
}
for (auto stri = str.cend() - phrase.size(), strend = str.cend(), phrasei = phrase.cbegin(); stri != strend; ++stri, ++phrasei) {
for (auto stri = str.cend() - phrase.size(), strend = str.cend(), phrasei = phrase.cbegin(); stri != strend; ++stri, ++phrasei) {
if (*stri != *phrasei) {
return false;
}
@ -266,7 +266,7 @@ template <typename StringType> bool endsWith(const StringType &str, const typena
if (str.size() < phraseSize) {
return false;
}
for (auto stri = str.cend() - phraseSize, strend = str.cend(); stri != strend; ++stri, ++phrase) {
for (auto stri = str.cend() - phraseSize, strend = str.cend(); stri != strend; ++stri, ++phrase) {
if (*stri != *phrase) {
return false;
}

@ -125,11 +125,10 @@ void IoTests::testBinaryReader()
CPPUNIT_ASSERT_EQUAL(true, reader.readBool());
CPPUNIT_ASSERT_EQUAL("abc"s, reader.readString(3));
CPPUNIT_ASSERT_EQUAL(reader.readLengthPrefixedString(), "ABC"s);
CPPUNIT_ASSERT_EQUAL(
"01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901"
"23456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123"
"45678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345"
"678901234567890123456789"s,
CPPUNIT_ASSERT_EQUAL("01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901"
"23456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123"
"45678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345"
"678901234567890123456789"s,
reader.readLengthPrefixedString());
CPPUNIT_ASSERT_EQUAL("def"s, reader.readTerminatedString());
testFile.seekg(-4, ios_base::cur);

Loading…
Cancel
Save