|
|
@ -93,4 +93,17 @@ void test_inputHandling_getNumbersNoFormular(void) |
|
|
|
pnt = getNumbers(halloWelt, 10, &formula); |
|
|
|
TEST_ASSERT_NULL(pnt); |
|
|
|
} |
|
|
|
|
|
|
|
void test_inputHandling_getNumbersAddFormular(void) |
|
|
|
{ |
|
|
|
char* pnt = NULL; |
|
|
|
char add[] = "4+5"; |
|
|
|
formula.functionsType = detectFunctionOperator(add,3); |
|
|
|
pnt = getNumbers(add, 3, &formula); |
|
|
|
showStruct(&formula); |
|
|
|
TEST_ASSERT_NULL(pnt); |
|
|
|
TEST_ASSERT_EQUAL_DOUBLE(4.0, formula.inputNumbers[0]); |
|
|
|
TEST_ASSERT_EQUAL_DOUBLE(5.0, formula.inputNumbers[1]); |
|
|
|
TEST_ASSERT_EQUAL_INT(2, formula.arrayLength); |
|
|
|
} |
|
|
|
#endif // TEST |