提交 9691acfb 编写于 作者: M mkarlesky

fixed forgotten includes

git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@131 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
上级 43b4c94f
......@@ -56,7 +56,7 @@ class UnityTestRunnerGenerator
def generate(input_file, output_file, tests, includes, used_mocks)
File.open(output_file, 'w') do |output|
create_header(output, used_mocks)
create_header(output, includes, used_mocks)
create_externs(output, tests, used_mocks)
create_mock_management(output, used_mocks)
create_suite_setup_and_teardown(output)
......@@ -127,13 +127,13 @@ class UnityTestRunnerGenerator
return mock_headers
end
def create_header(output, mocks)
def create_header(output, includes, mocks)
output.puts('/* AUTOGENERATED FILE. DO NOT EDIT. */')
create_runtest(output, mocks)
output.puts("\n//=======Automagically Detected Files To Include=====")
output.puts("#include \"#{@options[:framework].to_s}.h\"")
output.puts('#include "cmock.h"') unless (mocks.empty?)
@options[:includes].flatten.uniq.compact.each do |inc|
(@options[:includes].flatten.uniq.compact + includes.flatten.uniq.compact).each do |inc|
output.puts("#include #{inc.include?('<') ? inc : "\"#{inc.gsub('.h','')}.h\""}")
end
output.puts('#include <setjmp.h>')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册