mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-09-18 16:19:58 +00:00
- updated :unity_helper option to :unity_helper_path because it's... you know... a path. (still backwards compat when needed)
git-svn-id: http://cmock.svn.sourceforge.net/svnroot/cmock/trunk@213 bf332499-1b4d-0410-844d-d2d48d5cc64c
This commit is contained in:
Binary file not shown.
Binary file not shown.
+3
-2
@@ -15,7 +15,7 @@ class CMockConfig
|
||||
:strippables => ['(?:__attribute__\s*\(+.*?\)+)'],
|
||||
:attributes => ['__ramfunc', '__irq', '__fiq', 'register', 'extern'],
|
||||
:enforce_strict_ordering => false,
|
||||
:unity_helper => false,
|
||||
:unity_helper_path => false,
|
||||
:treat_as => {},
|
||||
:treat_as_void => [],
|
||||
:memcmp_if_unknown => true,
|
||||
@@ -54,6 +54,7 @@ class CMockConfig
|
||||
puts "WARNING: :#{opt.to_s} should be an array." unless (options[:verbosity] < 1)
|
||||
end
|
||||
end
|
||||
options[:unity_helper_path] ||= options[:unity_helper]
|
||||
options[:plugins].compact!
|
||||
options[:plugins].map! {|p| p.to_sym}
|
||||
@options = options
|
||||
@@ -76,7 +77,7 @@ class CMockConfig
|
||||
end
|
||||
|
||||
def load_unity_helper
|
||||
return File.new(@options[:unity_helper]).read if (@options[:unity_helper])
|
||||
return File.new(@options[:unity_helper_path]).read if (@options[:unity_helper_path])
|
||||
return nil
|
||||
end
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ class SystemTestGenerator
|
||||
cmock[:mock_prefix] = MOCK_PREFIX
|
||||
if not yaml_hash[:systest][:unity_helper].nil?
|
||||
cmock[:includes] << namix + UNITY_HELPER_H
|
||||
cmock[:unity_helper] = GENERATED_PATH + namix + UNITY_HELPER_H
|
||||
cmock[:unity_helper_path] = GENERATED_PATH + namix + UNITY_HELPER_H
|
||||
end
|
||||
|
||||
File.open(GENERATED_PATH + namix + 'cmock' + YAML_EXTENSION, 'w') do |out|
|
||||
|
||||
Reference in New Issue
Block a user