add .clang-format
Change-Id: I6d9ec8401dcd46781ea258bf8998faa2507fa91d
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/test/watchdog_test.hpp b/test/watchdog_test.hpp
index 87c64e9..50fa8f1 100644
--- a/test/watchdog_test.hpp
+++ b/test/watchdog_test.hpp
@@ -1,6 +1,6 @@
-#include <timer_test.hpp>
#include <chrono>
#include <memory>
+#include <timer_test.hpp>
#include <watchdog.hpp>
using namespace std::chrono;
@@ -9,44 +9,43 @@
// Test Watchdog functionality
class WdogTest : public TimerTest
{
- public:
- // Gets called as part of each TEST_F construction
- WdogTest()
- : bus(sdbusplus::bus::new_default()),
- wdog(std::make_unique<phosphor::watchdog::Watchdog>(
- bus, TEST_PATH, eventP)),
- defaultInterval(milliseconds(wdog->interval())),
- defaultDrift(30)
- {
- // Check for successful creation of
- // event handler and bus handler
- EXPECT_GE(rc, 0);
+ public:
+ // Gets called as part of each TEST_F construction
+ WdogTest() :
+ bus(sdbusplus::bus::new_default()),
+ wdog(std::make_unique<phosphor::watchdog::Watchdog>(bus, TEST_PATH,
+ eventP)),
+ defaultInterval(milliseconds(wdog->interval())), defaultDrift(30)
+ {
+ // Check for successful creation of
+ // event handler and bus handler
+ EXPECT_GE(rc, 0);
- // Initially the watchdog would be disabled
- EXPECT_FALSE(wdog->enabled());
- }
+ // Initially the watchdog would be disabled
+ EXPECT_FALSE(wdog->enabled());
+ }
- //sdbusplus handle
- sdbusplus::bus::bus bus;
+ // sdbusplus handle
+ sdbusplus::bus::bus bus;
- // Watchdog object
- std::unique_ptr<phosphor::watchdog::Watchdog> wdog;
+ // Watchdog object
+ std::unique_ptr<phosphor::watchdog::Watchdog> wdog;
- // This is the default interval as given in Interface definition
- milliseconds defaultInterval;
+ // This is the default interval as given in Interface definition
+ milliseconds defaultInterval;
- // Acceptable drift when we compare the interval to timeRemaining.
- // This is needed since it depends on when do we get scheduled and it
- // has happened that remaining time was off by few msecs.
- milliseconds defaultDrift;
+ // Acceptable drift when we compare the interval to timeRemaining.
+ // This is needed since it depends on when do we get scheduled and it
+ // has happened that remaining time was off by few msecs.
+ milliseconds defaultDrift;
- protected:
- // Dummy name for object path
- // This is just to satisfy the constructor. Does not have
- // a need to check if the objects paths have been created.
- static constexpr auto TEST_PATH = "/test/path";
+ protected:
+ // Dummy name for object path
+ // This is just to satisfy the constructor. Does not have
+ // a need to check if the objects paths have been created.
+ static constexpr auto TEST_PATH = "/test/path";
- // Returns how long it took for the current watchdog timer to be
- // disabled or have its timeRemaining reset.
- seconds waitForWatchdog(seconds timeLimit);
+ // Returns how long it took for the current watchdog timer to be
+ // disabled or have its timeRemaining reset.
+ seconds waitForWatchdog(seconds timeLimit);
};