diff --git a/lib/cmock_generator.rb b/lib/cmock_generator.rb index 66f4012..6fe191c 100644 --- a/lib/cmock_generator.rb +++ b/lib/cmock_generator.rb @@ -2,14 +2,14 @@ # CMock Project - Automatic Mock Generation for C # Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams # [Released under MIT License. Please refer to license.txt for details] -# ========================================== +# ========================================== $here = File.dirname __FILE__ class CMockGenerator attr_accessor :config, :file_writer, :module_name, :clean_mock_name, :mock_name, :utils, :plugins, :ordered - + def initialize(config, file_writer, utils, plugins) @file_writer = file_writer @utils = utils @@ -18,7 +18,7 @@ class CMockGenerator @prefix = @config.mock_prefix @ordered = @config.enforce_strict_ordering @framework = @config.framework.to_s - + @includes_h_pre_orig_header = (@config.includes || @config.includes_h_pre_orig_header || []).map{|h| h =~ /CallOrder == ++GlobalVerifyOrder), cmock_line, \"Out of order function calls. Function '#{function[:name]}'\");\n" end file << @plugins.run(:mock_implementation, function) - file << " return cmock_call_instance->ReturnVal;\n" unless (function[:return][:void?]) + file << " return cmock_call_instance->ReturnVal;\n" unless (function[:return][:void?]) file << "}\n\n" end - + def create_mock_interfaces(file, function) file << @utils.code_add_argument_loader(function) file << @plugins.run(:mock_interfaces, function)