提交 4e4d4291 编写于 作者: M mvandervoord

- updated documentation

- parameterized tests now output parameters as part of message


git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@110 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
上级 26c61f61
......@@ -206,7 +206,7 @@ class UnityTestRunnerGenerator
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; \\")
output.puts(" Unity.CurrentTestName = #TestFunc#{va_args2.empty? ? '' : " \"(\" ##{va_args2} \")\""}; \\")
output.puts(" Unity.CurrentTestLineNumber = TestLineNum; \\")
output.puts(" Unity.NumberOfTests++; \\")
output.puts(" if (TEST_PROTECT()) \\")
......
此差异由.gitattributes 抑制。
此差异由.gitattributes 抑制。
......@@ -17,6 +17,7 @@ include RakefileHelpers
DEFAULT_CONFIG_FILE = 'gcc.yml'
configure_toolchain(DEFAULT_CONFIG_FILE)
desc "Test unity with it's own unit tests"
task :unit do
run_tests get_unit_test_files
end
......
......@@ -4,7 +4,7 @@
#define RUN_TEST_NO_ARGS
#define RUN_TEST(TestFunc, TestLineNum, ...) \
{ \
Unity.CurrentTestName = #TestFunc; \
Unity.CurrentTestName = #TestFunc "(" #__VA_ARGS__ ")"; \
Unity.CurrentTestLineNumber = TestLineNum; \
Unity.NumberOfTests++; \
if (TEST_PROTECT()) \
......
......@@ -4,7 +4,7 @@
#define RUN_TEST_NO_ARGS
#define RUN_TEST(TestFunc, TestLineNum, ...) \
{ \
Unity.CurrentTestName = #TestFunc; \
Unity.CurrentTestName = #TestFunc "(" #__VA_ARGS__ ")"; \
Unity.CurrentTestLineNumber = TestLineNum; \
Unity.NumberOfTests++; \
if (TEST_PROTECT()) \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册