clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.
Change-Id: Ia968a74764d3bda33160a8a9890629ed3cc94d0e
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/src/test/erase/crypto_test.cpp b/src/test/erase/crypto_test.cpp
index 9eefa9d..dd3954e 100644
--- a/src/test/erase/crypto_test.cpp
+++ b/src/test/erase/crypto_test.cpp
@@ -63,8 +63,8 @@
EXPECT_CALL(*mockCryptIface, cryptKeyslotDestroy(_, 0)).Times(1);
- CryptErase myCryptErase =
- CryptErase(testFileName.c_str(), std::move(mockCryptIface));
+ CryptErase myCryptErase = CryptErase(testFileName.c_str(),
+ std::move(mockCryptIface));
EXPECT_NO_THROW(myCryptErase.doErase());
}
@@ -79,8 +79,8 @@
EXPECT_CALL(*mockCryptIface, cryptKeySlotMax(StrEq(CRYPT_LUKS2)))
.WillOnce(Return(-1));
- CryptErase myCryptErase =
- CryptErase(testFileName.c_str(), std::move(mockCryptIface));
+ CryptErase myCryptErase = CryptErase(testFileName.c_str(),
+ std::move(mockCryptIface));
EXPECT_THROW(myCryptErase.doErase(), ResourceNotFound);
}
@@ -95,8 +95,8 @@
EXPECT_CALL(*mockCryptIface, cryptKeySlotMax(StrEq(CRYPT_LUKS2)))
.WillOnce(Return(0));
- CryptErase myCryptErase =
- CryptErase(testFileName.c_str(), std::move(mockCryptIface));
+ CryptErase myCryptErase = CryptErase(testFileName.c_str(),
+ std::move(mockCryptIface));
EXPECT_THROW(myCryptErase.doErase(), ResourceNotFound);
}
@@ -114,8 +114,8 @@
EXPECT_CALL(*mockCryptIface, cryptKeySlotStatus(_, _))
.WillRepeatedly(Return(CRYPT_SLOT_INVALID));
- CryptErase myCryptErase =
- CryptErase(testFileName.c_str(), std::move(mockCryptIface));
+ CryptErase myCryptErase = CryptErase(testFileName.c_str(),
+ std::move(mockCryptIface));
EXPECT_NO_THROW(myCryptErase.doErase());
}
@@ -136,8 +136,8 @@
EXPECT_CALL(*mockCryptIface, cryptKeyslotDestroy(_, 0))
.WillOnce(Return(-1));
- CryptErase myCryptErase =
- CryptErase(testFileName.c_str(), std::move(mockCryptIface));
+ CryptErase myCryptErase = CryptErase(testFileName.c_str(),
+ std::move(mockCryptIface));
EXPECT_THROW(myCryptErase.doErase(), InternalFailure);
}
diff --git a/src/test/erase/pattern_test.cpp b/src/test/erase/pattern_test.cpp
index 0693163..e8ea6ce 100644
--- a/src/test/erase/pattern_test.cpp
+++ b/src/test/erase/pattern_test.cpp
@@ -166,8 +166,8 @@
size_t shortSize = 128;
Pattern tryPattern(testFileName);
auto shortData = std::vector<std::byte>(shortSize, std::byte{0});
- auto restOfData =
- std::vector<std::byte>(size - shortSize * 3, std::byte{0});
+ auto restOfData = std::vector<std::byte>(size - shortSize * 3,
+ std::byte{0});
std::span shortDataSpan{shortData};
std::span restOfDataSpan{restOfData};
// open the file and write none to it
diff --git a/src/test/erase/zero_test.cpp b/src/test/erase/zero_test.cpp
index 8570154..f57cd62 100644
--- a/src/test/erase/zero_test.cpp
+++ b/src/test/erase/zero_test.cpp
@@ -126,8 +126,8 @@
size_t shortSize = 128;
Zero pass(testFileName);
auto shortData = std::vector<std::byte>(shortSize, std::byte{0});
- auto restOfData =
- std::vector<std::byte>(size - shortSize * 3, std::byte{0});
+ auto restOfData = std::vector<std::byte>(size - shortSize * 3,
+ std::byte{0});
std::span shortDataSpan{shortData};
std::span restOfDataSpan{restOfData};
stdplus::fd::FdMock mock;
@@ -159,8 +159,8 @@
size_t shortSize = 128;
Zero tryZero(testFileName);
auto shortData = std::vector<std::byte>(shortSize, std::byte{0});
- auto restOfData =
- std::vector<std::byte>(size - shortSize * 3, std::byte{0});
+ auto restOfData = std::vector<std::byte>(size - shortSize * 3,
+ std::byte{0});
std::span shortDataSpan{shortData};
std::span restOfDataSpan{restOfData};
// open the file and write none zero to it
diff --git a/src/test/util_test.cpp b/src/test/util_test.cpp
index 5f16068..b85fca0 100644
--- a/src/test/util_test.cpp
+++ b/src/test/util_test.cpp
@@ -31,7 +31,6 @@
TEST(utilTest, estimatesSame)
{
-
std::string prefixName = ".";
std::string testFileName = prefixName + "/life_time";
std::ofstream testFile;
@@ -46,7 +45,6 @@
TEST(utilTest, estimatesNotAvailable)
{
-
std::string prefixName = ".";
std::string testFileName = prefixName + "/life_time";
std::ofstream testFile;