1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-23 08:25:58 +01:00

Merge pull request #382 from dpostorivo/ifndef-64-runner

Generate runner defines with #ifndef guards
This commit is contained in:
Mark VanderVoord
2018-12-21 23:12:59 -05:00
committed by GitHub

View File

@@ -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])}\"")