mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-06-06 05:25:29 +00:00
Merge pull request #257 from art-of-dom/ret-var-name-change
make ret variable more unique to prevent collision with with code under test
This commit is contained in:
@@ -60,9 +60,9 @@ class CMockGeneratorPluginCallback
|
||||
" UNITY_CLR_DETAILS();\n" \
|
||||
" return;\n }\n"
|
||||
else
|
||||
" #{function[:return][:type]} ret = #{generate_call(function)};\n" \
|
||||
" #{function[:return][:type]} cmock_cb_ret = #{generate_call(function)};\n" \
|
||||
" UNITY_CLR_DETAILS();\n" \
|
||||
" return ret;\n }\n"
|
||||
" return cmock_cb_ret;\n }\n"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -191,9 +191,9 @@ describe CMockGeneratorPluginCallback, "Verify CMockGeneratorPluginCallback Modu
|
||||
expected = [" if (!Mock.Apple_CallbackBool &&\n",
|
||||
" Mock.Apple_CallbackFunctionPointer != NULL)\n",
|
||||
" {\n",
|
||||
" int ret = Mock.Apple_CallbackFunctionPointer(Mock.Apple_CallbackCalls++);\n",
|
||||
" int cmock_cb_ret = Mock.Apple_CallbackFunctionPointer(Mock.Apple_CallbackCalls++);\n",
|
||||
" UNITY_CLR_DETAILS();\n",
|
||||
" return ret;\n",
|
||||
" return cmock_cb_ret;\n",
|
||||
" }\n"
|
||||
].join
|
||||
returned = @cmock_generator_plugin_callback.mock_implementation_precheck(function)
|
||||
@@ -246,9 +246,9 @@ describe CMockGeneratorPluginCallback, "Verify CMockGeneratorPluginCallback Modu
|
||||
expected = [" if (!Mock.Apple_CallbackBool &&\n",
|
||||
" Mock.Apple_CallbackFunctionPointer != NULL)\n",
|
||||
" {\n",
|
||||
" int ret = Mock.Apple_CallbackFunctionPointer(steak, flag, Mock.Apple_CallbackCalls++);\n",
|
||||
" int cmock_cb_ret = Mock.Apple_CallbackFunctionPointer(steak, flag, Mock.Apple_CallbackCalls++);\n",
|
||||
" UNITY_CLR_DETAILS();\n",
|
||||
" return ret;\n",
|
||||
" return cmock_cb_ret;\n",
|
||||
" }\n"
|
||||
].join
|
||||
returned = @cmock_generator_plugin_callback.mock_implementation_precheck(function)
|
||||
|
||||
Reference in New Issue
Block a user