From f212040c96b85e88490736028946aa1c49263d37 Mon Sep 17 00:00:00 2001 From: Eric Bagus Date: Fri, 9 Feb 2024 16:18:24 +0100 Subject: [PATCH] Implemented unittest for input handler method --- test/test_inputHandler.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/test_inputHandler.c diff --git a/test/test_inputHandler.c b/test/test_inputHandler.c new file mode 100644 index 0000000..5cf92c7 --- /dev/null +++ b/test/test_inputHandler.c @@ -0,0 +1,18 @@ +#include "../src/inputHandler.h" +#include "unity.h" + +void setUp(void) { + // set stuff up here +} + +void tearDown(void) { + // clean stuff up here +} + + +void test_inputHandler_returntwoforinputminus(void) { + int expectedResult = 2; + int result; + result = getOperationIdBySymbol('-'); + TEST_ASSERT_EQUAL_INT(expectedResult, result); +} \ No newline at end of file