mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-08-17 00:29:55 +00:00
added (void*) casts for TEST_ASSERT_EQUAL_MEMORY_MESSAGE
git-svn-id: http://cmock.svn.sourceforge.net/svnroot/cmock/trunk@59 bf332499-1b4d-0410-844d-d2d48d5cc64c
This commit is contained in:
@@ -82,7 +82,7 @@ class CMockGeneratorUtils
|
||||
unity_msg = (unity_func =~ /_MESSAGE/) ? ", #{msg}" : ''
|
||||
if (unity_func == "TEST_ASSERT_EQUAL_MEMORY_MESSAGE")
|
||||
full_expected = (expected.strip[0] == 42) ? expected.slice(1..-1) : "&(#{expected})"
|
||||
return "#{unity_func}(#{full_expected}, &(#{actual}), sizeof(#{c_type})#{unity_msg})"
|
||||
return "#{unity_func}((void*)#{full_expected}, (void*)&(#{actual}), sizeof(#{c_type})#{unity_msg})"
|
||||
else
|
||||
return "#{unity_func}(#{expected}, #{actual}#{unity_msg})"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user