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: Ic68b91e23738cafe198c50f40e46d4163bda02b6
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/src/test/handler.cpp b/src/test/handler.cpp
index 3671977..aac2d0f 100644
--- a/src/test/handler.cpp
+++ b/src/test/handler.cpp
@@ -246,8 +246,8 @@
{
std::string path = "/test/object_path_0";
std::vector<std::string> interfaces = {"bad_interface"};
- std::vector<std::string> subtreePath = getSubTreePaths(interfaceMap, path,
- 0, interfaces);
+ std::vector<std::string> subtreePath =
+ getSubTreePaths(interfaceMap, path, 0, interfaces);
ASSERT_TRUE(subtreePath.empty());
path = "/invalid_path";
@@ -263,8 +263,8 @@
std::vector<std::string> interfaces = {"test_interface_1",
"test_interface_3"};
// Root
- std::vector<std::string> subtreePath = getSubTreePaths(interfaceMap, "/", 0,
- interfaces);
+ std::vector<std::string> subtreePath =
+ getSubTreePaths(interfaceMap, "/", 0, interfaces);
ASSERT_THAT(subtreePath,
ElementsAre("/test/object_path_0/child",
"/test/object_path_0/child/grandchild/dog"));
@@ -293,10 +293,10 @@
std::vector<std::string> validInterfaces = {"test_interface_1",
"test_interface_2"};
// Associated path, but invalid interface
- ASSERT_TRUE(getAssociatedSubTree(interfaceMap, associationMap,
- validAssociatedPath, path, 0,
- invalidInterfaces)
- .empty());
+ ASSERT_TRUE(
+ getAssociatedSubTree(interfaceMap, associationMap, validAssociatedPath,
+ path, 0, invalidInterfaces)
+ .empty());
// Valid interface, not associated
ASSERT_TRUE(getAssociatedSubTree(interfaceMap, associationMap, path / "dog",
@@ -316,10 +316,10 @@
sdbusplus::message::object_path path0("/test/object_path_0");
sdbusplus::message::object_path path1("/test/object_path_0/child");
sdbusplus::message::object_path associatedPath = path0 / "descendent";
- std::vector<std::string> interfaces = {"test_interface_1",
- "test_interface_2",
- // Not associated to path
- "test_interface_3"};
+ std::vector<std::string> interfaces = {
+ "test_interface_1", "test_interface_2",
+ // Not associated to path
+ "test_interface_3"};
// Path0
std::vector<InterfaceMapType::value_type> subtree = getAssociatedSubTree(
@@ -368,10 +368,10 @@
.empty());
// Valid interface, not associated
- ASSERT_TRUE(getAssociatedSubTreePaths(interfaceMap, associationMap,
- path / "dog", path, 0,
- validInterfaces)
- .empty());
+ ASSERT_TRUE(
+ getAssociatedSubTreePaths(interfaceMap, associationMap, path / "dog",
+ path, 0, validInterfaces)
+ .empty());
// Invalid path, with valid association
path = sdbusplus::message::object_path("/invalid_path");
@@ -387,10 +387,10 @@
sdbusplus::message::object_path path0("/test/object_path_0");
sdbusplus::message::object_path path1("/test/object_path_0/child");
sdbusplus::message::object_path associatedPath = path0 / "descendent";
- std::vector<std::string> interfaces = {"test_interface_1",
- "test_interface_2",
- // Not associated to path
- "test_interface_3"};
+ std::vector<std::string> interfaces = {
+ "test_interface_1", "test_interface_2",
+ // Not associated to path
+ "test_interface_3"};
// Path0
std::vector<std::string> subtreePath = getAssociatedSubTreePaths(
@@ -405,9 +405,9 @@
ASSERT_THAT(subtreePath, ElementsAre("/test/object_path_0/child"));
// Path1
- subtreePath = getAssociatedSubTreePaths(interfaceMap, associationMap,
- path1 / "descendent", path1, 0,
- interfaces);
+ subtreePath =
+ getAssociatedSubTreePaths(interfaceMap, associationMap,
+ path1 / "descendent", path1, 0, interfaces);
ASSERT_THAT(subtreePath,
ElementsAre("/test/object_path_0/child/grandchild"));
}
diff --git a/src/test/interfaces_added.cpp b/src/test/interfaces_added.cpp
index 4446e23..63a6a26 100644
--- a/src/test/interfaces_added.cpp
+++ b/src/test/interfaces_added.cpp
@@ -34,8 +34,8 @@
auto interfaceMap = createDefaultInterfaceMap();
AssociationMaps assocMaps;
- auto intfAdded = createInterfacesAdded(assocDefsInterface,
- assocDefsProperty);
+ auto intfAdded =
+ createInterfacesAdded(assocDefsInterface, assocDefsProperty);
boost::asio::io_context io;