mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-09-11 04:39:59 +00:00
- updated example and main tests to show how to use generate_test_runner with yaml target file
- improved error reporting for generate_test_runner git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@96 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
This commit is contained in:
@@ -24,6 +24,7 @@ class UnityTestRunnerGenerator
|
||||
require 'yaml'
|
||||
yaml_guts = YAML.load_file(config_file)
|
||||
yaml_goodness = yaml_guts[:unity] ? yaml_guts[:unity] : yaml_guts[:cmock]
|
||||
raise "No :unity or :cmock section found in #{config_file}" unless yaml_goodness
|
||||
options[:cexception] = 1 unless (yaml_goodness[:plugins] & ['cexception', :cexception]).empty?
|
||||
options[:order] = 1 if (yaml_goodness[:enforce_strict_ordering])
|
||||
options[:framework] = (yaml_goodness[:framework] || :unity)
|
||||
@@ -120,7 +121,7 @@ class UnityTestRunnerGenerator
|
||||
output.puts('/* AUTOGENERATED FILE. DO NOT EDIT. */')
|
||||
output.puts("#include \"#{@options[:framework].to_s}.h\"")
|
||||
output.puts('#include "cmock.h"') unless (mocks.empty?)
|
||||
@options[:includes].flatten.each do |includes|
|
||||
@options[:includes].flatten.uniq.compact.each do |includes|
|
||||
output.puts("#include \"#{includes.gsub('.h','')}.h\"")
|
||||
end
|
||||
output.puts('#include <setjmp.h>')
|
||||
|
||||
Reference in New Issue
Block a user