mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-06-05 21:15:20 +00:00
Fix system test
Generator for callback plugin now checks for existence of ignore plugin to know what code to generate
This commit is contained in:
@@ -79,9 +79,12 @@ class CMockGeneratorPluginCallback
|
||||
|
||||
def mock_interfaces(function)
|
||||
func_name = function[:name]
|
||||
"void #{func_name}_StubWithCallback(CMOCK_#{func_name}_CALLBACK Callback)\n{\n" +
|
||||
" Mock.#{func_name}_IgnoreBool = (int)0;\n" +
|
||||
" Mock.#{func_name}_CallbackFunctionPointer = Callback;\n}\n\n"
|
||||
lines = ""
|
||||
lines << "void #{func_name}_StubWithCallback(CMOCK_#{func_name}_CALLBACK Callback)\n{\n"
|
||||
if @config.plugins.include? :ignore
|
||||
lines << " Mock.#{func_name}_IgnoreBool = (int)0;\n"
|
||||
end
|
||||
lines << " Mock.#{func_name}_CallbackFunctionPointer = Callback;\n}\n\n"
|
||||
end
|
||||
|
||||
def mock_destroy(function)
|
||||
|
||||
@@ -14,6 +14,7 @@ describe CMockGeneratorPluginCallback, "Verify CMockGeneratorPluginCallback Modu
|
||||
|
||||
@config.expect :callback_include_count, true
|
||||
@config.expect :callback_after_arg_check, false
|
||||
@config.expect :plugins, [:ignore]
|
||||
|
||||
@cmock_generator_plugin_callback = CMockGeneratorPluginCallback.new(@config, @utils)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user