From fd006a95acad36d15c3874530bf288f932f2a43e Mon Sep 17 00:00:00 2001 From: fdai7514 Date: Thu, 9 Feb 2023 01:40:06 +0100 Subject: [PATCH] implement unittest for calculatorGetUserInput.c --- build-project.sh | 1 + tests/test_calculatorGetUserInput.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 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_calculatorGetUserInput.c b/tests/test_calculatorGetUserInput.c index 3fabe3d..ff01ef4 100644 --- a/tests/test_calculatorGetUserInput.c +++ b/tests/test_calculatorGetUserInput.c @@ -2,7 +2,7 @@ #include "unity.h" -#include "calculatorGetUserInput.h" +#include "calculatorGetUserInput.c" void setUp(void) { @@ -14,7 +14,10 @@ void tearDown(void) void test_calculatorGetUserInput_NeedToImplement(void) { - TEST_IGNORE_MESSAGE("Need to Implement calculatorGetUserInput"); + int a, e; + e = 1; + a = allowOnly(); + TEST_ASSERT_EQUAL_INT(e, a); } #endif // TEST