clang-format: update to latest from docs repo
Since `Cpp11` is an alias for `Latest` and we should tend towards using the
latest C++ standard, update the C++ standard to Latest.
https://github.com/llvm/llvm-project/commit/e5032567903de19962333c4bf7d2edceaf4f9824#diff-b49a097415dff2837d9626d422c58ba8R82
https://github.com/openbmc/docs/blob/master/style/cpp/.clang-format
Also, other OpenBMC repos are doing the same.
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I449e88bb4e1e262060110e1a8f3e8db3ddfc74cf
diff --git a/test/libpldmresponder_base_test.cpp b/test/libpldmresponder_base_test.cpp
index 3baefdb..ac6e681 100644
--- a/test/libpldmresponder_base_test.cpp
+++ b/test/libpldmresponder_base_test.cpp
@@ -1,11 +1,11 @@
+#include "libpldm/base.h"
+
#include "libpldmresponder/base.hpp"
#include <string.h>
#include <array>
-#include "libpldm/base.h"
-
#include <gtest/gtest.h>
using namespace pldm::responder;
diff --git a/test/libpldmresponder_bios_attribute_test.cpp b/test/libpldmresponder_bios_attribute_test.cpp
index 4cc9db9..b4200d3 100644
--- a/test/libpldmresponder_bios_attribute_test.cpp
+++ b/test/libpldmresponder_bios_attribute_test.cpp
@@ -11,18 +11,15 @@
public:
TestAttribute(const Json& entry, DBusHandler* const dbusHandler) :
BIOSAttribute(entry, dbusHandler)
- {
- }
+ {}
void setAttrValueOnDbus(const pldm_bios_attr_val_table_entry*,
const pldm_bios_attr_table_entry*,
const BIOSStringTable&) override
- {
- }
+ {}
void constructEntry(const BIOSStringTable&, Table&, Table&) override
- {
- }
+ {}
const std::optional<DBusMapping>& getDbusMap()
{
diff --git a/test/libpldmresponder_bios_config_test.cpp b/test/libpldmresponder_bios_config_test.cpp
index b6ec9a0..371658c 100644
--- a/test/libpldmresponder_bios_config_test.cpp
+++ b/test/libpldmresponder_bios_config_test.cpp
@@ -4,9 +4,10 @@
#include "mocked_bios.hpp"
#include "mocked_utils.hpp"
+#include <nlohmann/json.hpp>
+
#include <fstream>
#include <memory>
-#include <nlohmann/json.hpp>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
diff --git a/test/libpldmresponder_bios_enum_attribute_test.cpp b/test/libpldmresponder_bios_enum_attribute_test.cpp
index 4cd5809..b6b53be 100644
--- a/test/libpldmresponder_bios_enum_attribute_test.cpp
+++ b/test/libpldmresponder_bios_enum_attribute_test.cpp
@@ -2,9 +2,10 @@
#include "mocked_bios.hpp"
#include "mocked_utils.hpp"
-#include <memory>
#include <nlohmann/json.hpp>
+#include <memory>
+
#include <gmock/gmock.h>
#include <gtest/gtest.h>
diff --git a/test/libpldmresponder_bios_integer_attribute_test.cpp b/test/libpldmresponder_bios_integer_attribute_test.cpp
index c2c8e36..48c228b 100644
--- a/test/libpldmresponder_bios_integer_attribute_test.cpp
+++ b/test/libpldmresponder_bios_integer_attribute_test.cpp
@@ -2,9 +2,10 @@
#include "mocked_bios.hpp"
#include "mocked_utils.hpp"
-#include <memory>
#include <nlohmann/json.hpp>
+#include <memory>
+
#include <gmock/gmock.h>
#include <gtest/gtest.h>
diff --git a/test/libpldmresponder_bios_string_attribute_test.cpp b/test/libpldmresponder_bios_string_attribute_test.cpp
index 747e60f..953d47d 100644
--- a/test/libpldmresponder_bios_string_attribute_test.cpp
+++ b/test/libpldmresponder_bios_string_attribute_test.cpp
@@ -2,9 +2,10 @@
#include "mocked_bios.hpp"
#include "mocked_utils.hpp"
-#include <memory>
#include <nlohmann/json.hpp>
+#include <memory>
+
#include <gmock/gmock.h>
#include <gtest/gtest.h>
diff --git a/test/libpldmresponder_bios_test.cpp b/test/libpldmresponder_bios_test.cpp
index 3ca0c38..9683d49 100644
--- a/test/libpldmresponder_bios_test.cpp
+++ b/test/libpldmresponder_bios_test.cpp
@@ -1,3 +1,6 @@
+#include "libpldm/base.h"
+#include "libpldm/bios.h"
+
#include "libpldmresponder/bios.hpp"
#include "libpldmresponder/bios_table.hpp"
@@ -8,9 +11,6 @@
#include <ctime>
#include <filesystem>
-#include "libpldm/base.h"
-#include "libpldm/bios.h"
-
#include <gtest/gtest.h>
using namespace pldm;
@@ -21,8 +21,7 @@
TEST(epochToBCDTime, testTime)
{
struct tm time
- {
- };
+ {};
time.tm_year = 119;
time.tm_mon = 3;
time.tm_mday = 13;
diff --git a/test/libpldmresponder_pdr_effecter_test.cpp b/test/libpldmresponder_pdr_effecter_test.cpp
index 1bf2730..98b31ea 100644
--- a/test/libpldmresponder_pdr_effecter_test.cpp
+++ b/test/libpldmresponder_pdr_effecter_test.cpp
@@ -1,8 +1,8 @@
+#include "libpldm/platform.h"
+
#include "libpldmresponder/pdr_utils.hpp"
#include "libpldmresponder/platform.hpp"
-#include "libpldm/platform.h"
-
#include <gtest/gtest.h>
using namespace pldm::responder;
diff --git a/test/mocked_bios.hpp b/test/mocked_bios.hpp
index 568fad9..6741306 100644
--- a/test/mocked_bios.hpp
+++ b/test/mocked_bios.hpp
@@ -10,8 +10,7 @@
{
public:
MockBIOSStringTable() : BIOSStringTable({})
- {
- }
+ {}
MOCK_METHOD(uint16_t, findHandle, (const std::string&), (const override));
diff --git a/test/pldm_utils_test.cpp b/test/pldm_utils_test.cpp
index 65b16c1..c9c5dd8 100644
--- a/test/pldm_utils_test.cpp
+++ b/test/pldm_utils_test.cpp
@@ -1,7 +1,7 @@
-#include "utils.hpp"
-
#include "libpldm/platform.h"
+#include "utils.hpp"
+
#include <gtest/gtest.h>
using namespace pldm::utils;
diff --git a/test/pldmd_registration_test.cpp b/test/pldmd_registration_test.cpp
index d37156b..37339c3 100644
--- a/test/pldmd_registration_test.cpp
+++ b/test/pldmd_registration_test.cpp
@@ -1,9 +1,9 @@
+#include "libpldm/base.h"
+
#include "invoker.hpp"
#include <stdexcept>
-#include "libpldm/base.h"
-
#include <gtest/gtest.h>
using namespace pldm;