Browse Source

Finished Whitespace Function Tests

remotes/origin/Input_Handling
Sophia Weber 11 months ago
parent
commit
98ba967d82
  1. 7
      test/test_inputHandling.c

7
test/test_inputHandling.c

@ -6,6 +6,7 @@
char halloWelt[]="Hallo Welt"; char halloWelt[]="Hallo Welt";
char halloWelt2[]="Hallo Welt"; char halloWelt2[]="Hallo Welt";
char halloWelt3[]="Ha llo W el t "; char halloWelt3[]="Ha llo W el t ";
char halloWelt4[]="Ha\n\nllo \r W el\r\r t ";
void setUp(void) void setUp(void)
{ {
@ -33,4 +34,10 @@ void test_inputHandling_deleteManyWhiteSpaces(void)
TEST_ASSERT_EQUAL_STRING("HalloWelt", halloWelt3); TEST_ASSERT_EQUAL_STRING("HalloWelt", halloWelt3);
} }
void test_inputHandling_deleteAllOtherCharacter(void)
{
deleteWhitespace(halloWelt4, 19);
TEST_ASSERT_EQUAL_STRING("HalloWelt", halloWelt4);
}
#endif // TEST #endif // TEST
Loading…
Cancel
Save