mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-08-05 21:11:10 +08:00
generate runner defines with #ifndef guards
This commit is contained in:
@ -179,7 +179,7 @@ class UnityTestRunnerGenerator
|
||||
output.puts('#endif')
|
||||
output.puts('#include <stdio.h>')
|
||||
if @options[:defines] && !@options[:defines].empty?
|
||||
@options[:defines].each { |d| output.puts("#define #{d}") }
|
||||
@options[:defines].each { |d| output.puts("#ifndef #{d}\n#define #{d}\n#endif /* #{d} */") }
|
||||
end
|
||||
if @options[:header_file] && !@options[:header_file].empty?
|
||||
output.puts("#include \"#{File.basename(@options[:header_file])}\"")
|
||||
|
Reference in New Issue
Block a user