add .clang-format
Change-Id: I6d9ec8401dcd46781ea258bf8998faa2507fa91d
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/test/timer_test.hpp b/test/timer_test.hpp
index 3f6ffea..cab9086 100644
--- a/test/timer_test.hpp
+++ b/test/timer_test.hpp
@@ -1,40 +1,39 @@
#include <iostream>
-#include <gtest/gtest.h>
#include <timer.hpp>
+#include <gtest/gtest.h>
+
// Base class for testing Timer
class TimerTest : public testing::Test
{
- public:
- // systemd event handler
- sd_event* events;
+ public:
+ // systemd event handler
+ sd_event* events;
- // Need this so that events can be initialized.
- int rc;
+ // Need this so that events can be initialized.
+ int rc;
- // Tells if the watchdog timer expired.
- bool expired = false;
+ // Tells if the watchdog timer expired.
+ bool expired = false;
- // Gets called as part of each TEST_F construction
- TimerTest()
- : rc(sd_event_default(&events)),
- eventP(events)
- {
- // Check for successful creation of
- // event handler and bus handler
- EXPECT_GE(rc, 0);
+ // Gets called as part of each TEST_F construction
+ TimerTest() : rc(sd_event_default(&events)), eventP(events)
+ {
+ // Check for successful creation of
+ // event handler and bus handler
+ EXPECT_GE(rc, 0);
- // Its already wrapped in eventP
- events = nullptr;
- }
+ // Its already wrapped in eventP
+ events = nullptr;
+ }
- // unique_ptr for sd_event
- phosphor::watchdog::EventPtr eventP;
+ // unique_ptr for sd_event
+ phosphor::watchdog::EventPtr eventP;
- // Handler called by timer expiration
- inline void timeOutHandler()
- {
- std::cout << "Time out handler called" << std::endl;
- expired = true;
- }
+ // Handler called by timer expiration
+ inline void timeOutHandler()
+ {
+ std::cout << "Time out handler called" << std::endl;
+ expired = true;
+ }
};