Browse Source

implement unittest for calculatorGetUserInput.c

remotes/origin/feature/calculator-get-user-input
fdai7514 2 years ago
parent
commit
fd006a95ac
  1. 1
      build-project.sh
  2. 7
      tests/test_calculatorGetUserInput.c

1
build-project.sh

@ -1,4 +1,5 @@
clear clear
ceedling test:all
cd src/ cd src/
gcc main.c -o main gcc main.c -o main
./main ./main

7
tests/test_calculatorGetUserInput.c

@ -2,7 +2,7 @@
#include "unity.h" #include "unity.h"
#include "calculatorGetUserInput.h"
#include "calculatorGetUserInput.c"
void setUp(void) void setUp(void)
{ {
@ -14,7 +14,10 @@ void tearDown(void)
void test_calculatorGetUserInput_NeedToImplement(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 #endif // TEST
Loading…
Cancel
Save