mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-09-12 05:09:58 +00:00
- rolled in color coding changes from Martyn
- cleaned up utils to make faster and clearer - corrected mistake in system test helper git-svn-id: http://cmock.svn.sourceforge.net/svnroot/cmock/trunk@157 bf332499-1b4d-0410-844d-d2d48d5cc64c
This commit is contained in:
@@ -17,7 +17,8 @@ class CMockGeneratorPluginCallback
|
||||
|
||||
def mock_function_declarations(function)
|
||||
func_name = function[:name]
|
||||
"typedef #{function[:return][:type]} (* CMOCK_#{func_name}_CALLBACK)(#{(function[:args_string] == "void") ? '' : function[:args_string] + ', '}int cmock_num_calls);\n" +
|
||||
return_type = function[:return][:const?] ? "const #{function[:return][:type]}" : function[:return][:type]
|
||||
"typedef #{return_type} (* CMOCK_#{func_name}_CALLBACK)(#{(function[:args_string] == "void") ? '' : function[:args_string] + ', '}int cmock_num_calls);\n" +
|
||||
"void #{func_name}_StubWithCallback(CMOCK_#{func_name}_CALLBACK Callback);\n"
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user