mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-08-09 20:57:51 +00:00
- fixed bug in cmock header generation if using non-default mock prefix.
git-svn-id: http://cmock.svn.sourceforge.net/svnroot/cmock/trunk@69 bf332499-1b4d-0410-844d-d2d48d5cc64c
This commit is contained in:
@@ -49,7 +49,7 @@ class CMockGenerator
|
||||
|
||||
def create_mock_header_header(file, filename)
|
||||
define_name = filename.gsub(/\.h/, "_h").upcase
|
||||
orig_filename = filename.gsub("Mock", "")
|
||||
orig_filename = filename.gsub(@config.mock_prefix, "")
|
||||
file << "/* AUTOGENERATED FILE. DO NOT EDIT. */\n"
|
||||
file << "#ifndef _#{define_name}\n"
|
||||
file << "#define _#{define_name}\n\n"
|
||||
|
||||
@@ -58,6 +58,7 @@ class CMockGeneratorTest < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
should "create the top of a header file" do
|
||||
@config.expect.mock_prefix.returns("Mock")
|
||||
orig_filename = "PoutPoutFish.h"
|
||||
define_name = "MOCKPOUTPOUTFISH_H"
|
||||
mock_name = "MockPoutPoutFish"
|
||||
|
||||
Reference in New Issue
Block a user