clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I08efc0671773edfae814ebcda5c01389155e2cac
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/test/test_utils.cpp b/test/test_utils.cpp
index 383ed4b..a93af26 100644
--- a/test/test_utils.cpp
+++ b/test/test_utils.cpp
@@ -42,16 +42,17 @@
// std::string
EXPECT_CALL(sdbusMock, sd_bus_message_read_basic(IsNull(), 's', _))
.WillOnce(Invoke([&](sd_bus_message*, char, void* p) {
- const char** s = static_cast<const char**>(p);
- // Read the first parameter, the string.
- *s = path0;
- return 0;
- })).WillOnce(Invoke([&](sd_bus_message*, char, void* p) {
- const char** s = static_cast<const char**>(p);
- // Read the first parameter, the string.
- *s = path1;
- return 0;
- }));
+ const char** s = static_cast<const char**>(p);
+ // Read the first parameter, the string.
+ *s = path0;
+ return 0;
+ }))
+ .WillOnce(Invoke([&](sd_bus_message*, char, void* p) {
+ const char** s = static_cast<const char**>(p);
+ // Read the first parameter, the string.
+ *s = path1;
+ return 0;
+ }));
EXPECT_CALL(sdbusMock, sd_bus_message_exit_container(IsNull()))
.WillOnce(Return(0)); /* end of std::vector */
@@ -74,9 +75,9 @@
TEST(Utils, IsAssociated)
{
std::string path = "/com/example/chassis/powersupply0";
- utils::AssociationList assocs = {{ACTIVATION_FWD_ASSOCIATION,
- ACTIVATION_REV_ASSOCIATION,
- "a-different-path"}};
+ utils::AssociationList assocs = {
+ {ACTIVATION_FWD_ASSOCIATION, ACTIVATION_REV_ASSOCIATION,
+ "a-different-path"}};
EXPECT_FALSE(utils::isAssociated(path, assocs));