Add Gtest to test watchdog
Change-Id: Ia0268b6b18999b6dd6cfd26bcadcff25734306f0
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
diff --git a/watchdog.cpp b/watchdog.cpp
index 99ef679..0c82df1 100644
--- a/watchdog.cpp
+++ b/watchdog.cpp
@@ -17,7 +17,7 @@
// Enable or disable watchdog
bool Watchdog::enabled(bool value)
{
- if (WatchdogInherits::enabled() != value)
+ if (this->enabled() != value)
{
if (value)
{
@@ -48,7 +48,7 @@
{
uint64_t timeRemain = 0;
- if (WatchdogInherits::enabled())
+ if (this->enabled())
{
// timer may have already expired and disabled
if (timer.getEnabled() != SD_EVENT_OFF)
@@ -73,7 +73,7 @@
// Reset the timer to a new expiration value
uint64_t Watchdog::timeRemaining(uint64_t value)
{
- if (WatchdogInherits::enabled())
+ if (this->enabled())
{
// Disable the timer
timer.setEnabled<std::false_type>();