- support typedefs of pointer types in treat_as

- fixed multi-line typedef declaration rejection

git-svn-id: http://cmock.svn.sourceforge.net/svnroot/cmock/trunk@179 bf332499-1b4d-0410-844d-d2d48d5cc64c
This commit is contained in:
mvandervoord
2010-07-19 14:02:42 +00:00
parent 7e0c3907b8
commit 840e38998b
4 changed files with 72 additions and 13 deletions
+6 -2
View File
@@ -33,8 +33,12 @@ class CMockUnityHelperParser
def map_C_types
c_types = {}
@config.treat_as.each_pair do |ctype, expecttype|
c_types[ctype.gsub(/\s+/,'_')] = "UNITY_TEST_ASSERT_EQUAL_#{expecttype}"
c_types[ctype.gsub(/\s+/,'_')+'*'] = "UNITY_TEST_ASSERT_EQUAL_#{expecttype}_ARRAY"
if (expecttype =~ /\*/)
c_types[ctype.gsub(/\s+/,'_')] = "UNITY_TEST_ASSERT_EQUAL_#{expecttype.gsub(/\*/,'')}_ARRAY"
else
c_types[ctype.gsub(/\s+/,'_')] = "UNITY_TEST_ASSERT_EQUAL_#{expecttype}"
c_types[ctype.gsub(/\s+/,'_')+'*'] = "UNITY_TEST_ASSERT_EQUAL_#{expecttype}_ARRAY"
end
end
c_types
end