mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-07-29 23:37:50 +00:00
Some more tests for :treat_include: with extern + some comments
This commit is contained in:
@@ -141,7 +141,7 @@ class CMockHeaderParser
|
||||
if (@treat_inline == :include)
|
||||
src_lines.each {
|
||||
|src_line|
|
||||
src_line.gsub!(/^inline/, "")
|
||||
src_line.gsub!(/^inline/, "") # Remove "inline" so that they are 'normal' functions
|
||||
}
|
||||
else
|
||||
src_lines.delete_if {|line| !(line =~ /(?:^|\s+)(?:inline)\s+/).nil?} # remove inline functions
|
||||
|
||||
@@ -460,6 +460,7 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
||||
"uint32 extern_name_func(unsigned int);\n" +
|
||||
"uint32 funcinline(unsigned int);\n" +
|
||||
"inline void inlineBar(unsigned int);\n" +
|
||||
"extern int extern_bar(void);\n" +
|
||||
"static inline void staticinlineBar(unsigned int);\n" +
|
||||
"static inline void bar(unsigned int);\n" +
|
||||
"static inline void bar(unsigned int)\n" +
|
||||
@@ -485,6 +486,7 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
||||
"uint32 extern_name_func(unsigned int);\n" +
|
||||
"uint32 funcinline(unsigned int);\n" +
|
||||
"inline void inlineBar(unsigned int);\n" +
|
||||
"extern int extern_bar(void);\n" +
|
||||
"static inline void staticinlineBar(unsigned int);\n" +
|
||||
"static inline void bar(unsigned int);\n" +
|
||||
"static inline void bar(unsigned int)\n" +
|
||||
@@ -497,6 +499,7 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
||||
"uint32 extern_name_func(unsigned int)",
|
||||
"uint32 funcinline(unsigned int)",
|
||||
"void inlineBar(unsigned int)",
|
||||
"extern int extern_bar(void)",
|
||||
"void staticinlineBar(unsigned int)",
|
||||
"void bar(unsigned int)"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user