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_calculatorSquare.c b/tests/test_calculatorSquare.c index 3bbf2b1..981dda0 100644 --- a/tests/test_calculatorSquare.c +++ b/tests/test_calculatorSquare.c @@ -2,7 +2,7 @@ #include "unity.h" -#include "calculatorSquare.h" +#include "calculatorSquare.c" void setUp(void) { @@ -12,9 +12,23 @@ void tearDown(void) { } -void test_calculatorSquare_NeedToImplement(void) +void test1_calculatorMultiply(void) { - TEST_IGNORE_MESSAGE("Need to Implement calculatorSquare"); + float p, a, e; + p = 26.24; + a = calculatorSquare(p); + e = p * p; + TEST_ASSERT_EQUAL_FLOAT(e, a); } +void test2_calculatorMultiply(void) +{ + float p, a, e; + p = 5; + a = calculatorSquare(p); + e = p * p; + TEST_ASSERT_EQUAL_FLOAT(e, a); +} + + #endif // TEST