From de05d331e03171b9c8f82da1b6a82738078d3482 Mon Sep 17 00:00:00 2001 From: fdai7514 Date: Thu, 9 Feb 2023 01:24:41 +0100 Subject: [PATCH] implement unittest for displayMenuCalculator.c --- build-project.sh | 1 + tests/test_displayMenuCalculator.c | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/build-project.sh b/build-project.sh index 43a0588..51cf723 100755 --- a/build-project.sh +++ b/build-project.sh @@ -1,4 +1,5 @@ clear +ceedling test:all cd src/ gcc main.c -o main ./main diff --git a/tests/test_displayMenuCalculator.c b/tests/test_displayMenuCalculator.c index d6a51be..66c2499 100644 --- a/tests/test_displayMenuCalculator.c +++ b/tests/test_displayMenuCalculator.c @@ -2,7 +2,7 @@ #include "unity.h" -#include "displayMenuCalculator.h" +#include "displayMenuCalculator.c" void setUp(void) { @@ -12,9 +12,13 @@ void tearDown(void) { } -void test_displayMenuCalculator_NeedToImplement(void) +void test_displayMenuCalculator(void) { - TEST_IGNORE_MESSAGE("Need to Implement displayMenuCalculator"); + int e, a; + e = 1; + a = check(); + TEST_ASSERT_EQUAL_INT(e, a); } + #endif // TEST