From bf89030423f144a082027ce76e681a273cb04181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Sun, 16 Oct 2022 15:40:05 +0000 Subject: [PATCH] user input test: Register enum with Catch Now when REQUIRE ( a == b ) fails we see the values of a and b. --- tests/unit/modules/user_input/test_user_input.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/unit/modules/user_input/test_user_input.cpp b/tests/unit/modules/user_input/test_user_input.cpp index 5ada1d5..37e0792 100644 --- a/tests/unit/modules/user_input/test_user_input.cpp +++ b/tests/unit/modules/user_input/test_user_input.cpp @@ -5,6 +5,13 @@ #include "../hal/adc.h" #include "user_input.h" +CATCH_REGISTER_ENUM(mui::Event, + mui::Event::NoEvent, + mui::Event::Left, + mui::Event::Middle, + mui::Event::Right, + mui::Event::FromPrinter) + void PressButtonAndDebounce(uint8_t btnIndex) { hal::adc::SetADC(config::buttonsADCIndex, config::buttonADCLimits[btnIndex][0] + 1); while (!mb::buttons.ButtonPressed(btnIndex)) {