Skip to content

Commit

Permalink
WatchdogInterface tested
Browse files Browse the repository at this point in the history
  • Loading branch information
CL16gtgh committed Feb 9, 2024
1 parent f5d3b77 commit a1d60c7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/test_interfaces/Watchdog_interface_test.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
#include <Arduino.h>
#include <unity.h>

#include "WatchdpgInterface.h"
#include "WatchdogInterface.h"

void test_watchdog_kick()
{
// Hypothetical pin setup
WatchdogInterface wd_interface(1);
wd_interface.init(0);
wd_interface.init(millis());
TEST_ASSERT_EQUAL(HIGH, wd_interface.get_watchdog_state());
delay(5);
wd_interface.kick_watchdog(millis());
TEST_ASSERT_EQUAL(HIGH, wd_interface.get_watchdog_state());
delay(5);
wd_interface.kick_watchdog(millis());
TEST_ASSERT_EQUAL(LOW, wd_interface.get_watchdog_state());

}

0 comments on commit a1d60c7

Please sign in to comment.