You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

34 lines
431 B

#ifdef TEST
#include "unity.h"
#include "calculatorSquare.c"
void setUp(void)
{
}
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);
}
void test2_calculatorMultiply(void)
{
float p, a, e;
p = 5;
a = calculatorSquare(p);
e = p * p;
TEST_ASSERT_EQUAL_FLOAT(e, a);
}
#endif // TEST