#ifdef TEST #include "unity.h" #include "inputHandling.h" char halloWelt[]="Hallo Welt"; char halloWelt2[]="Hallo Welt"; char halloWelt3[]="Ha llo W el t "; char halloWelt4[]="Ha\n\nllo \r W el\r\r t "; void setUp(void) { } void tearDown(void) { } void test_inputHandling_deleteOneWhiteSpace(void) { deleteWhitespace(halloWelt, 10); TEST_ASSERT_EQUAL_STRING("HalloWelt", halloWelt); } void test_inputHandling_deleteTwoWhiteSpaces(void) { deleteWhitespace(halloWelt2, 11); TEST_ASSERT_EQUAL_STRING("HalloWelt", halloWelt2); } void test_inputHandling_deleteManyWhiteSpaces(void) { deleteWhitespace(halloWelt3, 16); TEST_ASSERT_EQUAL_STRING("HalloWelt", halloWelt3); } void test_inputHandling_deleteAllOtherCharacter(void) { deleteWhitespace(halloWelt4, 19); TEST_ASSERT_EQUAL_STRING("HalloWelt", halloWelt4); } void test_inputHandling_findAddFunctionType(void) { op type = opNotSupported; type = detectFunctionOperator("4+5", 3); TEST_ASSERT_TRUE(opAdd == type); } void test_inputHandling_findSubFunctionType(void) { op type = opNotSupported; type = detectFunctionOperator("4-5", 3); TEST_ASSERT_TRUE(opSub == type); } #endif // TEST