提交 689610b8 编写于 作者: M Mark VanderVoord

reorder includes in generated test runners

上级 43c75117
...@@ -170,7 +170,6 @@ class UnityTestRunnerGenerator ...@@ -170,7 +170,6 @@ class UnityTestRunnerGenerator
output.puts('#include "cmock.h"') unless (mocks.empty?) output.puts('#include "cmock.h"') unless (mocks.empty?)
output.puts('#include <setjmp.h>') output.puts('#include <setjmp.h>')
output.puts('#include <stdio.h>') output.puts('#include <stdio.h>')
output.puts('#include "CException.h"') if @options[:plugins].include?(:cexception)
if (@options[:defines] && !@options[:defines].empty?) if (@options[:defines] && !@options[:defines].empty?)
@options[:defines].each {|d| output.puts("#define #{d}")} @options[:defines].each {|d| output.puts("#define #{d}")}
end end
...@@ -187,6 +186,7 @@ class UnityTestRunnerGenerator ...@@ -187,6 +186,7 @@ class UnityTestRunnerGenerator
mocks.each do |mock| mocks.each do |mock|
output.puts("#include \"#{mock.gsub('.h','')}.h\"") output.puts("#include \"#{mock.gsub('.h','')}.h\"")
end end
output.puts('#include "CException.h"') if @options[:plugins].include?(:cexception)
if @options[:enforce_strict_ordering] if @options[:enforce_strict_ordering]
output.puts('') output.puts('')
output.puts('int GlobalExpectCount;') output.puts('int GlobalExpectCount;')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册