Automate test cases.
[simavr] / tests / test_atmega48_watchdog_test.c
diff --git a/tests/test_atmega48_watchdog_test.c b/tests/test_atmega48_watchdog_test.c
new file mode 100644 (file)
index 0000000..b2bc562
--- /dev/null
@@ -0,0 +1,15 @@
+#include "tests.h"
+
+int main(int argc, char **argv) {
+       tests_init(argc, argv);
+
+       static const char *expected =
+               "Watchdog is active\r\n"
+               "Waiting for Watchdog to kick\r\n"
+               "Watchdog kicked us!\r\n";
+
+       tests_assert_uart_receive("atmega48_watchdog_test.axf", 1000000,
+                                 expected, '0');
+       tests_success();
+       return 0;
+}