diff --git a/lib/cmock_config.rb b/lib/cmock_config.rb index b21b61e..3288d9c 100644 --- a/lib/cmock_config.rb +++ b/lib/cmock_config.rb @@ -29,6 +29,7 @@ class CMockConfig :when_ptr => :compare_data, #the options being :compare_ptr, :compare_data, or :smart :verbosity => 2, #the options being 0 errors only, 1 warnings and errors, 2 normal info, 3 verbose :treat_externs => :exclude, #the options being :include or :exclude + :treat_inline => :exclude, #the options being :include or :exclude :callback_include_count => true, :callback_after_arg_check => false, :includes => nil, diff --git a/lib/cmock_header_parser.rb b/lib/cmock_header_parser.rb index 0cf1947..800f52e 100644 --- a/lib/cmock_header_parser.rb +++ b/lib/cmock_header_parser.rb @@ -6,7 +6,7 @@ class CMockHeaderParser - attr_accessor :funcs, :c_attr_noconst, :c_attributes, :treat_as_void, :treat_externs + attr_accessor :funcs, :c_attr_noconst, :c_attributes, :treat_as_void, :treat_externs, :treat_inline def initialize(cfg) @funcs = [] @@ -24,7 +24,9 @@ class CMockHeaderParser @local_as_void = @treat_as_void @verbosity = cfg.verbosity @treat_externs = cfg.treat_externs + @treat_inline = cfg.treat_inline @c_strippables += ['extern'] if (@treat_externs == :include) #we'll need to remove the attribute if we're allowing externs + @c_strippables += ['inline'] if (@treat_inline == :include) #we'll need to remove the attribute if we're allowing externs end def parse(name, source) diff --git a/test/unit/cmock_header_parser_test.rb b/test/unit/cmock_header_parser_test.rb index fa156f4..b1b0c22 100644 --- a/test/unit/cmock_header_parser_test.rb +++ b/test/unit/cmock_header_parser_test.rb @@ -23,6 +23,7 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do @config.expect :when_no_prototypes, :error @config.expect :verbosity, 1 @config.expect :treat_externs, :exclude + @config.expect :treat_inline, :exclude @config.expect :array_size_type, ['int', 'size_t'] @config.expect :array_size_name, 'size|len'