|
|
@ -2,7 +2,7 @@ |
|
|
|
|
|
|
|
#include "unity.h" |
|
|
|
|
|
|
|
#include "calculatorCube.h" |
|
|
|
#include "calculatorCube.c" |
|
|
|
|
|
|
|
void setUp(void) |
|
|
|
{ |
|
|
@ -12,9 +12,24 @@ void tearDown(void) |
|
|
|
{ |
|
|
|
} |
|
|
|
|
|
|
|
void test_calculatorCube_NeedToImplement(void) |
|
|
|
void test1_calculatorCube(void) |
|
|
|
{ |
|
|
|
TEST_IGNORE_MESSAGE("Need to Implement calculatorCube"); |
|
|
|
float p, a, e; |
|
|
|
p = 5; |
|
|
|
a = calculatorCube(p); |
|
|
|
e = p * p * p; |
|
|
|
TEST_ASSERT_EQUAL_FLOAT(e, a); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test2_calculatorCube(void) |
|
|
|
{ |
|
|
|
float p, a, e; |
|
|
|
p = 6; |
|
|
|
a = calculatorCube(p); |
|
|
|
e = p * p * p; |
|
|
|
TEST_ASSERT_EQUAL_FLOAT(e, a); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#endif // TEST |