summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2023-05-10 15:51:34 +0300
committerPatrick Williams <patrick@stwcx.xyz>2023-05-11 00:18:24 +0300
commit89492a157c9cf972b342421e24d41fd382510251 (patch)
tree64ed25f427f1ab1981f8c2bdcbfbc7fde5db80e9 /test
parentcddbf3df0ea0b78521b62f30f2ce764c6619018a (diff)
downloadbmcweb-89492a157c9cf972b342421e24d41fd382510251.tar.xz
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: I75f89d2959b0f1338c20d72ad669fbdc1d720835 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'test')
-rw-r--r--test/http/verb_test.cpp2
-rw-r--r--test/include/dbus_utility_test.cpp2
-rw-r--r--test/include/google/google_service_root_test.cpp2
-rw-r--r--test/include/human_sort_test.cpp2
-rw-r--r--test/redfish-core/include/privileges_test.cpp6
-rw-r--r--test/redfish-core/include/redfish_aggregator_test.cpp20
-rw-r--r--test/redfish-core/include/utils/hex_utils_test.cpp2
-rw-r--r--test/redfish-core/include/utils/query_param_test.cpp2
-rw-r--r--test/redfish-core/lib/chassis_test.cpp3
9 files changed, 20 insertions, 21 deletions
diff --git a/test/http/verb_test.cpp b/test/http/verb_test.cpp
index 76dd8d0fb1..aff6ec7405 100644
--- a/test/http/verb_test.cpp
+++ b/test/http/verb_test.cpp
@@ -53,4 +53,4 @@ TEST(HttpVerbToStringTest, ValidCase)
HttpVerb httpVerb = static_cast<HttpVerb>(verbIndex);
EXPECT_EQ(httpVerbToString(httpVerb), verbMap[httpVerb]);
}
-} \ No newline at end of file
+}
diff --git a/test/include/dbus_utility_test.cpp b/test/include/dbus_utility_test.cpp
index 71978d01ba..c6b02c66ee 100644
--- a/test/include/dbus_utility_test.cpp
+++ b/test/include/dbus_utility_test.cpp
@@ -45,4 +45,4 @@ TEST(GetNthStringFromPath, InvalidIndexReturnsFalse)
EXPECT_FALSE(getNthStringFromPath(path, -1, result));
}
} // namespace
-} // namespace dbus::utility \ No newline at end of file
+} // namespace dbus::utility
diff --git a/test/include/google/google_service_root_test.cpp b/test/include/google/google_service_root_test.cpp
index 32d4e526fb..b4a476b2dd 100644
--- a/test/include/google/google_service_root_test.cpp
+++ b/test/include/google/google_service_root_test.cpp
@@ -36,4 +36,4 @@ TEST(HandleGoogleV1Get, OnSuccess)
}
} // namespace
-} // namespace crow::google_api \ No newline at end of file
+} // namespace crow::google_api
diff --git a/test/include/human_sort_test.cpp b/test/include/human_sort_test.cpp
index be21a198b0..78d2d2220c 100644
--- a/test/include/human_sort_test.cpp
+++ b/test/include/human_sort_test.cpp
@@ -55,4 +55,4 @@ TEST(AlphaNum, LessTest)
"Alpha 2"};
EXPECT_THAT(sorted, ElementsAreArray({"Alpha 2", "Alpha 10"}));
}
-} // namespace \ No newline at end of file
+} // namespace
diff --git a/test/redfish-core/include/privileges_test.cpp b/test/redfish-core/include/privileges_test.cpp
index 2d0da021eb..b7f7cbcc42 100644
--- a/test/redfish-core/include/privileges_test.cpp
+++ b/test/redfish-core/include/privileges_test.cpp
@@ -60,8 +60,8 @@ TEST(PrivilegeTest, PrivilegeCheckForSingleCaseFailure)
TEST(PrivilegeTest, PrivilegeCheckForANDCaseSuccess)
{
- auto userPrivileges =
- Privileges{"Login", "ConfigureManager", "ConfigureSelf"};
+ auto userPrivileges = Privileges{"Login", "ConfigureManager",
+ "ConfigureSelf"};
OperationMap entityPrivileges{
{boost::beast::http::verb::get,
{{"Login", "ConfigureManager", "ConfigureSelf"}}}};
@@ -135,4 +135,4 @@ TEST(PrivilegeTest, GetActivePrivilegeNames)
expectedPrivileges[4]));
}
} // namespace
-} // namespace redfish \ No newline at end of file
+} // namespace redfish
diff --git a/test/redfish-core/include/redfish_aggregator_test.cpp b/test/redfish-core/include/redfish_aggregator_test.cpp
index 2d19cee705..055d1371cd 100644
--- a/test/redfish-core/include/redfish_aggregator_test.cpp
+++ b/test/redfish-core/include/redfish_aggregator_test.cpp
@@ -248,8 +248,8 @@ void assertProcessResponse(unsigned result)
jsonResp["Name"] = "Test";
crow::Response resp;
- resp.body() =
- jsonResp.dump(2, ' ', true, nlohmann::json::error_handler_t::replace);
+ resp.body() = jsonResp.dump(2, ' ', true,
+ nlohmann::json::error_handler_t::replace);
resp.addHeader("Content-Type", "application/json");
resp.addHeader("Allow", "GET");
resp.addHeader("Location", "/redfish/v1/Chassis/TestChassis");
@@ -658,8 +658,8 @@ TEST(processContainsSubordinateResponse, addLinks)
jsonValue["Test"]["@odata.id"] = "/redfish/v1/Test";
jsonValue["TelemetryService"]["@odata.id"] = "/redfish/v1/TelemetryService";
jsonValue["UpdateService"]["@odata.id"] = "/redfish/v1/UpdateService";
- resp.body() =
- jsonValue.dump(2, ' ', true, nlohmann::json::error_handler_t::replace);
+ resp.body() = jsonValue.dump(2, ' ', true,
+ nlohmann::json::error_handler_t::replace);
auto asyncResp = std::make_shared<bmcweb::AsyncResp>();
asyncResp->res.result(200);
@@ -701,8 +701,8 @@ TEST(processContainsSubordinateResponse, localNotOK)
jsonValue["Test"]["@odata.id"] = "/redfish/v1/Test";
jsonValue["TelemetryService"]["@odata.id"] = "/redfish/v1/TelemetryService";
jsonValue["UpdateService"]["@odata.id"] = "/redfish/v1/UpdateService";
- resp.body() =
- jsonValue.dump(2, ' ', true, nlohmann::json::error_handler_t::replace);
+ resp.body() = jsonValue.dump(2, ' ', true,
+ nlohmann::json::error_handler_t::replace);
RedfishAggregator::processContainsSubordinateResponse("prefix", asyncResp,
resp);
@@ -769,8 +769,8 @@ TEST(processContainsSubordinateResponse, noValidLinks)
nlohmann::json jsonValue;
resp.addHeader("Content-Type", "application/json");
jsonValue["@odata.id"] = "/redfish/v1";
- resp.body() =
- jsonValue.dump(2, ' ', true, nlohmann::json::error_handler_t::replace);
+ resp.body() = jsonValue.dump(2, ' ', true,
+ nlohmann::json::error_handler_t::replace);
RedfishAggregator::processContainsSubordinateResponse("prefix", asyncResp,
resp);
@@ -788,8 +788,8 @@ TEST(processContainsSubordinateResponse, noValidLinks)
jsonValue["Test"]["@odata.id"] = "/redfish/v1/Test";
jsonValue["TelemetryService"]["@odata.id"] = "/redfish/v1/TelemetryService";
jsonValue["UpdateService"]["@odata.id"] = "/redfish/v1/UpdateService";
- resp.body() =
- jsonValue.dump(2, ' ', true, nlohmann::json::error_handler_t::replace);
+ resp.body() = jsonValue.dump(2, ' ', true,
+ nlohmann::json::error_handler_t::replace);
RedfishAggregator::processContainsSubordinateResponse("prefix", asyncResp,
resp);
diff --git a/test/redfish-core/include/utils/hex_utils_test.cpp b/test/redfish-core/include/utils/hex_utils_test.cpp
index 8fd4638d09..d96e4d4681 100644
--- a/test/redfish-core/include/utils/hex_utils_test.cpp
+++ b/test/redfish-core/include/utils/hex_utils_test.cpp
@@ -80,4 +80,4 @@ TEST(HexStringToBytes, Failure)
EXPECT_THAT(hexStringToBytes("012"), IsEmpty());
}
-} // namespace \ No newline at end of file
+} // namespace
diff --git a/test/redfish-core/include/utils/query_param_test.cpp b/test/redfish-core/include/utils/query_param_test.cpp
index d049314d75..8c75241d77 100644
--- a/test/redfish-core/include/utils/query_param_test.cpp
+++ b/test/redfish-core/include/utils/query_param_test.cpp
@@ -232,7 +232,7 @@ TEST(GetSelectParam, TrieNodesRespectAllProperties)
SelectTrie getTrie(std::span<std::string_view> properties)
{
SelectTrie trie;
- for (auto const& property : properties)
+ for (const auto& property : properties)
{
EXPECT_TRUE(trie.insertNode(property));
}
diff --git a/test/redfish-core/lib/chassis_test.cpp b/test/redfish-core/lib/chassis_test.cpp
index a04385984e..8f181632ba 100644
--- a/test/redfish-core/lib/chassis_test.cpp
+++ b/test/redfish-core/lib/chassis_test.cpp
@@ -42,7 +42,6 @@ void assertChassisResetActionInfoGet(const std::string& chassisId,
TEST(HandleChassisResetActionInfoGet, StaticAttributesAreExpected)
{
-
auto response = std::make_shared<bmcweb::AsyncResp>();
std::error_code err;
crow::Request request{{boost::beast::http::verb::get, "/whatever", 11},
@@ -57,4 +56,4 @@ TEST(HandleChassisResetActionInfoGet, StaticAttributesAreExpected)
}
} // namespace
-} // namespace redfish \ No newline at end of file
+} // namespace redfish