Browse Source

Added test for operation handler extracting method

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

9
test/test_operationHandler.c

@ -46,4 +46,11 @@ void test_operationHandler_extractingFirstNumber(void) {
char str[] = {'4', '8', ' ', '5', '\0'};
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