mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-09-08 19:29:56 +00:00
- fixed an error in pointer handling. beefed up tests
git-svn-id: http://cmock.svn.sourceforge.net/svnroot/cmock/trunk@142 bf332499-1b4d-0410-844d-d2d48d5cc64c
This commit is contained in:
@@ -8,10 +8,14 @@ class CMockUnityHelperParser
|
||||
end
|
||||
|
||||
def get_helper(ctype)
|
||||
lookup = ctype.gsub(/const\s+/,'').strip.gsub(/\s+/,'_')
|
||||
lookup = ctype.gsub(/(?:^|(\S?)(\s*)|(\W))const(?:$|(\s*)(\S)|(\W))/,'\1\3\5\6').strip.gsub(/\s+/,'_')
|
||||
return @c_types[lookup] if (@c_types[lookup])
|
||||
raise("Don't know how to test #{ctype} and memory tests are disabled!") unless @config.memcmp_if_unknown
|
||||
return 'TEST_ASSERT_EQUAL_MEMORY_MESSAGE'
|
||||
if (ctype =~ /\*/)
|
||||
return 'TEST_ASSERT_EQUAL_MEMORY_MESSAGE_ARRAY'
|
||||
else
|
||||
return 'TEST_ASSERT_EQUAL_MEMORY_MESSAGE'
|
||||
end
|
||||
end
|
||||
|
||||
private ###########################
|
||||
|
||||
Reference in New Issue
Block a user