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: Icd194181395c93ad4486785aec752f2096a00ea7
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/test/bit_string_test.cpp b/test/bit_string_test.cpp
index 1c7290c..98bab7d 100644
--- a/test/bit_string_test.cpp
+++ b/test/bit_string_test.cpp
@@ -4,7 +4,7 @@
using namespace libhei;
-static constexpr uint32_t UINT8_BIT_LEN = (sizeof(uint8_t) * 8);
+static constexpr uint32_t UINT8_BIT_LEN = (sizeof(uint8_t) * 8);
static constexpr uint32_t UINT64_BIT_LEN = (sizeof(uint64_t) * 8);
// setBit()
diff --git a/test/flyweight_test.cpp b/test/flyweight_test.cpp
index 9ed9eb6..0b629a9 100644
--- a/test/flyweight_test.cpp
+++ b/test/flyweight_test.cpp
@@ -31,8 +31,8 @@
auto f2 = foo_factory.get(2);
auto f3 = foo_factory.get(1); // same as f1
- ASSERT_NE(f1, f2); // Pointing to different objects
- ASSERT_EQ(f1, f3); // Pointing to the same object
+ ASSERT_NE(f1, f2); // Pointing to different objects
+ ASSERT_EQ(f1, f3); // Pointing to the same object
ASSERT_EQ(size_t(2),
foo_factory.size()); // Only two entries in the flyweight
diff --git a/test/operator_register_test.cpp b/test/operator_register_test.cpp
index 227a566..2f79ba7 100644
--- a/test/operator_register_test.cpp
+++ b/test/operator_register_test.cpp
@@ -48,9 +48,9 @@
TEST(OperatorRegisterTest, BasicOperationsWithFlyweights)
{
auto& const_factory = Flyweight<const ConstantRegister>::getSingleton();
- auto& and_factory = Flyweight<const AndRegister>::getSingleton();
- auto& or_factory = Flyweight<const OrRegister>::getSingleton();
- auto& not_factory = Flyweight<const NotRegister>::getSingleton();
+ auto& and_factory = Flyweight<const AndRegister>::getSingleton();
+ auto& or_factory = Flyweight<const OrRegister>::getSingleton();
+ auto& not_factory = Flyweight<const NotRegister>::getSingleton();
auto const1 = const_factory.get(CONST1);
auto const2 = const_factory.get(CONST2);
@@ -70,7 +70,7 @@
TEST(OperatorRegisterTest, ShiftOperations)
{
- auto& const_factory = Flyweight<const ConstantRegister>::getSingleton();
+ auto& const_factory = Flyweight<const ConstantRegister>::getSingleton();
auto& lshift_factory = Flyweight<const LeftShiftRegister>::getSingleton();
auto& rshift_factory = Flyweight<const RightShiftRegister>::getSingleton();
@@ -96,10 +96,10 @@
// Something seemingly complex:
// ~(((CONST1 & CONST2) << 12) | ((CONST1 | CONST2) >> 4)))
- auto& const_factory = Flyweight<const ConstantRegister>::getSingleton();
- auto& and_factory = Flyweight<const AndRegister>::getSingleton();
- auto& or_factory = Flyweight<const OrRegister>::getSingleton();
- auto& not_factory = Flyweight<const NotRegister>::getSingleton();
+ auto& const_factory = Flyweight<const ConstantRegister>::getSingleton();
+ auto& and_factory = Flyweight<const AndRegister>::getSingleton();
+ auto& or_factory = Flyweight<const OrRegister>::getSingleton();
+ auto& not_factory = Flyweight<const NotRegister>::getSingleton();
auto& lshift_factory = Flyweight<const LeftShiftRegister>::getSingleton();
auto& rshift_factory = Flyweight<const RightShiftRegister>::getSingleton();
@@ -125,7 +125,7 @@
TEST(OperatorRegisterTest, ConstRegConstructor)
{
auto& const_factory = Flyweight<const ConstantRegister>::getSingleton();
- auto& and_factory = Flyweight<const AndRegister>::getSingleton();
+ auto& and_factory = Flyweight<const AndRegister>::getSingleton();
// The ConstRegister constructor is a template that requires some integer
// type.
diff --git a/test/simulator/simulator.hpp b/test/simulator/simulator.hpp
index 085c5ff..4f81508 100644
--- a/test/simulator/simulator.hpp
+++ b/test/simulator/simulator.hpp
@@ -43,11 +43,11 @@
/** The list of supported chip types for the simulator. */
enum SimChipType
{
- SAMPLE = 0xdeadbeef,
+ SAMPLE = 0xdeadbeef,
EXPLORER_11 = 0x60d20011,
EXPLORER_20 = 0x60d20020,
- P10_10 = 0x20da0010,
- P10_20 = 0x20da0020,
+ P10_10 = 0x20da0010,
+ P10_20 = 0x20da0020,
};
private:
@@ -125,8 +125,8 @@
void addSignature(const Signature& i_signature)
{
// First check if this entry already exists.
- auto itr =
- std::find(iv_expSigList.begin(), iv_expSigList.end(), i_signature);
+ auto itr = std::find(iv_expSigList.begin(), iv_expSigList.end(),
+ i_signature);
ASSERT_EQ(iv_expSigList.end(), itr);
// Add the new entry.
diff --git a/test/test-util-hash.cpp b/test/test-util-hash.cpp
index ba35625..bec7505 100644
--- a/test/test-util-hash.cpp
+++ b/test/test-util-hash.cpp
@@ -8,11 +8,11 @@
{
std::string s{"SOME_RANDOM_STRING"};
- uint8_t h1 = 0xBE;
- uint16_t h2 = 0xF2DD;
- uint32_t h3 = 0xDFB31440;
- uint64_t h4 = 0xD0D3828Ec49F687C;
- NodeId_t h5 = 0xF2DD; // 2-byte field
+ uint8_t h1 = 0xBE;
+ uint16_t h2 = 0xF2DD;
+ uint32_t h3 = 0xDFB31440;
+ uint64_t h4 = 0xD0D3828Ec49F687C;
+ NodeId_t h5 = 0xF2DD; // 2-byte field
RegisterId_t h6 = static_cast<RegisterId_t>(0x31D080); // 3-byte field
EXPECT_EQ(h1, hash<uint8_t>(s));