|
@ -47,3 +47,10 @@ void test_operationHandler_extractingFirstNumber(void) { |
|
|
int result = extractFirstNumber(str); |
|
|
int result = extractFirstNumber(str); |
|
|
TEST_ASSERT_EQUAL_INT(expectedResult, result); |
|
|
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); |
|
|
|
|
|
} |