mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-09-14 14:19:58 +00:00
- Improved handling of pointer types as function arguments
git-svn-id: http://cmock.svn.sourceforge.net/svnroot/cmock/trunk@220 bf332499-1b4d-0410-844d-d2d48d5cc64c
This commit is contained in:
@@ -34,11 +34,12 @@ class CMockUnityHelperParser
|
||||
def map_C_types
|
||||
c_types = {}
|
||||
@config.treat_as.each_pair do |ctype, expecttype|
|
||||
c_type = ctype.gsub(/\s+/,'_')
|
||||
if (expecttype =~ /\*/)
|
||||
c_types[ctype.gsub(/\s+/,'_')] = "UNITY_TEST_ASSERT_EQUAL_#{expecttype.gsub(/\*/,'')}_ARRAY"
|
||||
c_types[c_type] = "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"
|
||||
c_types[c_type] = "UNITY_TEST_ASSERT_EQUAL_#{expecttype}"
|
||||
c_types[c_type+'*'] ||= "UNITY_TEST_ASSERT_EQUAL_#{expecttype}_ARRAY"
|
||||
end
|
||||
end
|
||||
c_types
|
||||
|
||||
Reference in New Issue
Block a user