reenable results summary.

support tests named spec as well.
clean up UnityBegin to make us not have to dig inside it to inject the filename.
Add UNITY_OUTPUT_START() and UNITY_OUTPUT_COMPLETE() for future use.
This commit is contained in:
Mark VanderVoord
2014-07-30 22:12:49 -04:00
parent a4a2eb787d
commit 14b074336b
5 changed files with 35 additions and 30 deletions

View File

@ -78,7 +78,7 @@ class UnityTestRunnerGenerator
lines.each_with_index do |line, index|
#find tests
if line =~ /^((?:\s*TEST_CASE\s*\(.*?\)\s*)*)\s*void\s+(test.*?)\s*\(\s*(.*)\s*\)/
if line =~ /^((?:\s*TEST_CASE\s*\(.*?\)\s*)*)\s*void\s+((?:test.*)|(?:spec.*))\s*\(\s*(.*)\s*\)/
arguments = $1
name = $2
call = $3
@ -266,8 +266,7 @@ class UnityTestRunnerGenerator
output.puts("int main(void)")
output.puts("{")
output.puts(" suite_setup();") unless @options[:suite_setup].nil?
output.puts(" UnityBegin();")
output.puts(" Unity.TestFile = \"#{filename}\";")
output.puts(" UnityBegin(\"#{filename}\");")
if (@options[:use_param_tests])
tests.each do |test|
if ((test[:args].nil?) or (test[:args].empty?))