clang-format: Update to match docs repo
Update the .clang-format file and run clang-format-6.0.
This .clang-format matches the example one in
https://github.com/openbmc/docs/blob/master/cpp-style-and-conventions.md#clang-formatting
Change-Id: Id6760866dedbaeafd83ea8ef2e0303e30b8955aa
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/test/TestI2cOcc.cpp b/test/TestI2cOcc.cpp
index bf976d7..92028fd 100644
--- a/test/TestI2cOcc.cpp
+++ b/test/TestI2cOcc.cpp
@@ -1,9 +1,10 @@
+#include "i2c_occ.hpp"
+
#include <experimental/filesystem>
#include <fstream>
-#include <gtest/gtest.h>
#include <string>
-#include "i2c_occ.hpp"
+#include <gtest/gtest.h>
#ifdef I2C_OCC
namespace i2c_occ
@@ -33,10 +34,9 @@
const auto OTHER_STRING = "SomeOtherString123"s;
-
class TestUtilGetOccHwmonDevices : public testing::Test
{
-public:
+ public:
TestUtilGetOccHwmonDevices()
{
// Prepare env for test case
@@ -171,4 +171,3 @@
} // namespace i2c_occ
#endif // I2C_OCC
-
diff --git a/test/utest.cpp b/test/utest.cpp
index dc80cc2..eb9ca0b 100644
--- a/test/utest.cpp
+++ b/test/utest.cpp
@@ -1,43 +1,45 @@
-#include <gtest/gtest.h>
+#include "powercap.hpp"
+
#include <occ_events.hpp>
#include <occ_manager.hpp>
-#include "powercap.hpp"
+
+#include <gtest/gtest.h>
using namespace open_power::occ;
class VerifyOccInput : public ::testing::Test
{
- public:
- VerifyOccInput() :
- bus(sdbusplus::bus::new_default()),
- rc(sd_event_default(&event)),
- eventP(event),
- manager(bus, eventP),
- occStatus(bus, eventP, "/test/path/occ1", manager),
- pcap(bus,occStatus)
- {
- EXPECT_GE(rc, 0);
- event = nullptr;
- }
- ~VerifyOccInput()
- {}
+ public:
+ VerifyOccInput() :
+ bus(sdbusplus::bus::new_default()), rc(sd_event_default(&event)),
+ eventP(event), manager(bus, eventP),
+ occStatus(bus, eventP, "/test/path/occ1", manager), pcap(bus, occStatus)
+ {
+ EXPECT_GE(rc, 0);
+ event = nullptr;
+ }
+ ~VerifyOccInput()
+ {
+ }
- sdbusplus::bus::bus bus;
- sd_event* event;
- int rc;
- open_power::occ::EventPtr eventP;
+ sdbusplus::bus::bus bus;
+ sd_event* event;
+ int rc;
+ open_power::occ::EventPtr eventP;
- Manager manager;
- Status occStatus;
- powercap::PowerCap pcap;
+ Manager manager;
+ Status occStatus;
+ powercap::PowerCap pcap;
};
-TEST_F(VerifyOccInput, PcapDisabled) {
- uint32_t occInput = pcap.getOccInput(100,false);
+TEST_F(VerifyOccInput, PcapDisabled)
+{
+ uint32_t occInput = pcap.getOccInput(100, false);
EXPECT_EQ(occInput, 0);
}
-TEST_F(VerifyOccInput, PcapEnabled) {
- uint32_t occInput = pcap.getOccInput(100,true);
+TEST_F(VerifyOccInput, PcapEnabled)
+{
+ uint32_t occInput = pcap.getOccInput(100, true);
EXPECT_EQ(occInput, 90);
}