- tweaked parameterized tests to be C99 standards compliant

- fixed a few bugs in fixtures to get it to pass against our standard compilers
- added extern of OUTPUT_CHAR method to keep compilers from complaining

git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@107 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
This commit is contained in:
mvandervoord
2010-12-01 01:56:24 +00:00
parent 5a6b8c405b
commit 57178b9295
8 changed files with 35 additions and 20 deletions
+10 -5
View File
@@ -203,6 +203,7 @@ class UnityTestRunnerGenerator
va_args1 = @options[:use_param_tests] ? ', ...' : ''
va_args2 = @options[:use_param_tests] ? '__VA_ARGS__' : ''
output.puts("\n//=======Test Runner Used To Run Each Test Below=====")
output.puts("#define RUN_TEST_NO_ARGS") if @options[:use_param_tests]
output.puts("#define RUN_TEST(TestFunc, TestLineNum#{va_args1}) \\")
output.puts("{ \\")
output.puts(" Unity.CurrentTestName = #TestFunc; \\")
@@ -246,12 +247,16 @@ class UnityTestRunnerGenerator
output.puts(" suite_setup();") unless @options[:suite_setup].nil?
output.puts(" Unity.TestFile = \"#{filename}\";")
output.puts(" UnityBegin();")
tests.each do |test|
if ((test[:args].nil?) or (test[:args].empty?))
output.puts(" RUN_TEST(#{test[:name]}, #{test[:line_number]});")
else
test[:args].each {|args| output.puts(" RUN_TEST(#{test[:name]}, #{test[:line_number]}, #{args});")}
if (@options[:use_param_tests])
tests.each do |test|
if ((test[:args].nil?) or (test[:args].empty?))
output.puts(" RUN_TEST(#{test[:name]}, #{test[:line_number]}, RUN_TEST_NO_ARGS);")
else
test[:args].each {|args| output.puts(" RUN_TEST(#{test[:name]}, #{test[:line_number]}, #{args});")}
end
end
else
tests.each { |test| output.puts(" RUN_TEST(#{test[:name]}, #{test[:line_number]});") }
end
output.puts()
output.puts(" return #{@options[:suite_teardown].nil? ? "" : "suite_teardown"}(UnityEnd());")