void test_NS_operand2_should_mock_and_throw_error(void){ int value; int e; Text *text = textNew("135"); String *str = stringNew(text); extractValue_ExpectAndThrow(str, 2); Try{ value = NS(str); }Catch(e){ TEST_ASSERT_EQUAL(ERR_ILLEGAL_ARGUMENT, e); } }
void test_fsfd_operand1_ERR_EMPTY_ARGUMENT_should_mock_and_throw_error(void){ int value; int e; Text *text = textNew(""); String *str = stringNew(text); extractValue_ExpectAndThrow(str, 3); Try{ value = FSFD(str); }Catch(e){ TEST_ASSERT_EQUAL(ERR_EMPTY_ARGUMENT, e); } }