diff --git a/src/calculatorSquare.c b/src/calculatorSquare.c index a58fe24..e28cd3b 100644 --- a/src/calculatorSquare.c +++ b/src/calculatorSquare.c @@ -1,4 +1,7 @@ #include "calculatorSquare.h" +// Note: +/* This Function may or may not be implemented in actual program, even if it is merged to the main branch. + If it is temporarily not included in the main Program, then this has a role in future Development of the Project */ float calculatorSquare(float num) { diff --git a/tests/test_calculatorSquare.c b/tests/test_calculatorSquare.c index 981dda0..2a610f6 100644 --- a/tests/test_calculatorSquare.c +++ b/tests/test_calculatorSquare.c @@ -3,6 +3,10 @@ #include "unity.h" #include "calculatorSquare.c" +// Note: +/* This Function may or may not be implemented in actual program, even if it is merged to the main branch. + If it is temporarily not included in the main Program, then this has a role in future Development of the Project */ + void setUp(void) { @@ -14,21 +18,19 @@ void tearDown(void) void test1_calculatorMultiply(void) { - float p, a, e; - p = 26.24; - a = calculatorSquare(p); - e = p * p; - TEST_ASSERT_EQUAL_FLOAT(e, a); + float num, actual, expected; //Arrange + num = 26.24; + expected = num * num; + actual = calculatorSquare(num); //Act + TEST_ASSERT_EQUAL_FLOAT(expected, actual); //Assert } void test2_calculatorMultiply(void) { - float p, a, e; - p = 5; - a = calculatorSquare(p); - e = p * p; - TEST_ASSERT_EQUAL_FLOAT(e, a); + float num, actual, expected; //Arrange + num = 5; + expected = num * num; + actual = calculatorSquare(num); //Act + TEST_ASSERT_EQUAL_FLOAT(expected, actual); //Assert } - - #endif // TEST