Browse Source

Added test for operation handler extracting method

remotes/origin/develop
Eric Bagus 11 months ago
parent
commit
e66354b194
  1. 7
      test/test_operationHandler.c

7
test/test_operationHandler.c

@ -47,3 +47,10 @@ void test_operationHandler_extractingFirstNumber(void) {
int result = extractFirstNumber(str);
TEST_ASSERT_EQUAL_INT(expectedResult, result);
}
void test_operationHandler_removefirstnumberfromoriginalstring(void) {
char expected[] = {'5', '\0'};
char str[] = {'4', '8', ' ', '5', '\0'};
extractFirstNumber(str);
TEST_ASSERT_EQUAL_STRING(expected, str);
}
Loading…
Cancel
Save