diff options
Diffstat (limited to 'test/button_test.c')
| -rw-r--r-- | test/button_test.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/test/button_test.c b/test/button_test.c index 3c48e43..bef557c 100644 --- a/test/button_test.c +++ b/test/button_test.c @@ -1,8 +1,17 @@ #include "button.h" #include "mode.h" +#include "stubbed/testutils.h" #include <assert.h> #include <avr/io.h> +void before_each() { + PINA = (1 << PA0); // Active on low + button_tick_count = 0; + button_inactive_for_ticks = 0; +} + +void after_each() {} + void test_button_press() { assert(check_button_state() == ButtonIdle); @@ -51,13 +60,6 @@ void test_button_inactive_after_press() { assert(check_button_state() == ButtonActive); } -void before_each() { - PINA = (1 << PA0); // Active on low - button_tick_count = 0; - button_inactive_for_ticks = 0; -} -#define TEST before_each(); - int main() { TEST test_button_press(); TEST test_button_long_press(); |
