mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-10-20 23:57:59 +00:00
- 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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user