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: If87740ef153661e338448c9de753cbd61fd164eb
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/test/test_health_metric_collection.cpp b/test/test_health_metric_collection.cpp
index 7086369..8135eb0 100644
--- a/test/test_health_metric_collection.cpp
+++ b/test/test_health_metric_collection.cpp
@@ -98,16 +98,16 @@
.WillRepeatedly(Invoke(
[&]([[maybe_unused]] sd_bus* bus, [[maybe_unused]] const char* path,
[[maybe_unused]] const char* interface, const char** names) {
- // Test no signal generation for metric init properties
- const std::set<std::string> metricInitProperties = {"MaxValue",
- "MinValue", "Unit"};
- EXPECT_THAT(metricInitProperties,
- testing::Not(testing::Contains(names[0])));
- // Test signal generated for Value property set
- const std::set<std::string> metricSetProperties = {"Value"};
- EXPECT_THAT(metricSetProperties, testing::Contains(names[0]));
- return 0;
- }));
+ // Test no signal generation for metric init properties
+ const std::set<std::string> metricInitProperties = {
+ "MaxValue", "MinValue", "Unit"};
+ EXPECT_THAT(metricInitProperties,
+ testing::Not(testing::Contains(names[0])));
+ // Test signal generated for Value property set
+ const std::set<std::string> metricSetProperties = {"Value"};
+ EXPECT_THAT(metricSetProperties, testing::Contains(names[0]));
+ return 0;
+ }));
EXPECT_CALL(sdbusMock,
sd_bus_emit_properties_changed_strv(
@@ -115,12 +115,12 @@
.WillRepeatedly(Invoke(
[&]([[maybe_unused]] sd_bus* bus, [[maybe_unused]] const char* path,
[[maybe_unused]] const char* interface, const char** names) {
- // Test signal generated for Value property set
- EXPECT_STREQ("Value", names[0]);
- // Test no signal generation for threshold asserted
- EXPECT_STRNE("Asserted", names[0]);
- return 0;
- }));
+ // Test signal generated for Value property set
+ EXPECT_STREQ("Value", names[0]);
+ // Test no signal generation for threshold asserted
+ EXPECT_STRNE("Asserted", names[0]);
+ return 0;
+ }));
createCollection();
}
@@ -138,9 +138,9 @@
.WillRepeatedly(Invoke(
[&]([[maybe_unused]] sd_bus* bus, [[maybe_unused]] const char* path,
[[maybe_unused]] const char* interface, const char** names) {
- EXPECT_THAT("Value", StrEq(names[0]));
- return 0;
- }));
+ EXPECT_THAT("Value", StrEq(names[0]));
+ return 0;
+ }));
// Test threshold asserted property change
EXPECT_CALL(sdbusMock,
@@ -149,11 +149,12 @@
.WillRepeatedly(Invoke(
[&]([[maybe_unused]] sd_bus* bus, [[maybe_unused]] const char* path,
[[maybe_unused]] const char* interface, const char** names) {
- // Test signal generation for threshold properties set
- const std::set<std::string> thresholdProperties = {"Value", "Asserted"};
- EXPECT_THAT(thresholdProperties, testing::Contains(names[0]));
- return 0;
- }));
+ // Test signal generation for threshold properties set
+ const std::set<std::string> thresholdProperties = {"Value",
+ "Asserted"};
+ EXPECT_THAT(thresholdProperties, testing::Contains(names[0]));
+ return 0;
+ }));
// Test AssertionChanged signal generation
EXPECT_CALL(sdbusMock,