mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-09-08 03:09:57 +00:00
- fixed error in callback generation with no arguments, no returns, and no count values
git-svn-id: http://cmock.svn.sourceforge.net/svnroot/cmock/trunk@217 bf332499-1b4d-0410-844d-d2d48d5cc64c
This commit is contained in:
@@ -48,7 +48,7 @@ class CMockGeneratorPluginCallback
|
||||
when 1 then " Mock.#{func_name}_CallbackFunctionPointer(Mock.#{func_name}_CallbackCalls++);\n return;\n }\n"
|
||||
when 2 then " Mock.#{func_name}_CallbackFunctionPointer(#{function[:args].map{|m| m[:name]}.join(', ')});\n return;\n }\n"
|
||||
when 3 then " Mock.#{func_name}_CallbackFunctionPointer(#{function[:args].map{|m| m[:name]}.join(', ')}, Mock.#{func_name}_CallbackCalls++);\n return;\n }\n"
|
||||
when 4 then " return Mock.#{func_name}_CallbackFunctionPointer(void);\n }\n"
|
||||
when 4 then " return Mock.#{func_name}_CallbackFunctionPointer();\n }\n"
|
||||
when 5 then " return Mock.#{func_name}_CallbackFunctionPointer(Mock.#{func_name}_CallbackCalls++);\n }\n"
|
||||
when 6 then " return Mock.#{func_name}_CallbackFunctionPointer(#{function[:args].map{|m| m[:name]}.join(', ')});\n }\n"
|
||||
when 7 then " return Mock.#{func_name}_CallbackFunctionPointer(#{function[:args].map{|m| m[:name]}.join(', ')}, Mock.#{func_name}_CallbackCalls++);\n }\n"
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
extern const char * bars(void);
|
||||
void no_pointers(int a, char* b);
|
||||
int mixed(int a, int* b, int c);
|
||||
void no_args(void);
|
||||
|
||||
:source:
|
||||
:header: |
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
- :ignore
|
||||
- :callback
|
||||
:callback_after_arg_check: true
|
||||
#:callback_include_count: false
|
||||
:callback_include_count: false
|
||||
:treat_externs: :include
|
||||
|
||||
:systest:
|
||||
@@ -26,6 +26,7 @@
|
||||
const char * bars(void);
|
||||
void no_pointers(int a, char* b);
|
||||
int mixed(int a, int* b, int c);
|
||||
void no_args(void);
|
||||
|
||||
:source:
|
||||
:header: |
|
||||
|
||||
Reference in New Issue
Block a user