提交 a4a2eb78 编写于 作者: G Greg Williams

Added more robust handling of test includes, and to provide backwards API...

Added more robust handling of test includes, and to provide backwards API compatibility for Ceedling
上级 bff1fc68
......@@ -130,7 +130,7 @@ class UnityTestRunnerGenerator
return mock_headers
end
def create_header(output, mocks, testfile_includes)
def create_header(output, mocks, testfile_includes=[])
output.puts('/* AUTOGENERATED FILE. DO NOT EDIT. */')
create_runtest(output, mocks)
output.puts("\n//=======Automagically Detected Files To Include=====")
......@@ -142,9 +142,9 @@ class UnityTestRunnerGenerator
output.puts('#include <setjmp.h>')
output.puts('#include <stdio.h>')
output.puts('#include "CException.h"') if @options[:plugins].include?(:cexception)
testfile_includes.delete("unity").delete("cmock")
testrunner_includes = testfile_includes - mocks
testrunner_includes.each do |inc|
testfile_includes.delete_if{|inc| inc =~ /(unity|cmock)/}
testrunner_includes = testfile_includes - mocks
testrunner_includes.each do |inc|
output.puts("#include #{inc.include?('<') ? inc : "\"#{inc.gsub('.h','')}.h\""}")
end
mocks.each do |mock|
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册