mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-23 00:15:58 +01:00
- 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
This commit is contained in:
@@ -206,7 +206,7 @@ class UnityTestRunnerGenerator
|
|||||||
output.puts("#define RUN_TEST_NO_ARGS") if @options[:use_param_tests]
|
output.puts("#define RUN_TEST_NO_ARGS") if @options[:use_param_tests]
|
||||||
output.puts("#define RUN_TEST(TestFunc, TestLineNum#{va_args1}) \\")
|
output.puts("#define RUN_TEST(TestFunc, TestLineNum#{va_args1}) \\")
|
||||||
output.puts("{ \\")
|
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.CurrentTestLineNumber = TestLineNum; \\")
|
||||||
output.puts(" Unity.NumberOfTests++; \\")
|
output.puts(" Unity.NumberOfTests++; \\")
|
||||||
output.puts(" if (TEST_PROTECT()) \\")
|
output.puts(" if (TEST_PROTECT()) \\")
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -17,6 +17,7 @@ include RakefileHelpers
|
|||||||
DEFAULT_CONFIG_FILE = 'gcc.yml'
|
DEFAULT_CONFIG_FILE = 'gcc.yml'
|
||||||
configure_toolchain(DEFAULT_CONFIG_FILE)
|
configure_toolchain(DEFAULT_CONFIG_FILE)
|
||||||
|
|
||||||
|
desc "Test unity with it's own unit tests"
|
||||||
task :unit do
|
task :unit do
|
||||||
run_tests get_unit_test_files
|
run_tests get_unit_test_files
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#define RUN_TEST_NO_ARGS
|
#define RUN_TEST_NO_ARGS
|
||||||
#define RUN_TEST(TestFunc, TestLineNum, ...) \
|
#define RUN_TEST(TestFunc, TestLineNum, ...) \
|
||||||
{ \
|
{ \
|
||||||
Unity.CurrentTestName = #TestFunc; \
|
Unity.CurrentTestName = #TestFunc "(" #__VA_ARGS__ ")"; \
|
||||||
Unity.CurrentTestLineNumber = TestLineNum; \
|
Unity.CurrentTestLineNumber = TestLineNum; \
|
||||||
Unity.NumberOfTests++; \
|
Unity.NumberOfTests++; \
|
||||||
if (TEST_PROTECT()) \
|
if (TEST_PROTECT()) \
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#define RUN_TEST_NO_ARGS
|
#define RUN_TEST_NO_ARGS
|
||||||
#define RUN_TEST(TestFunc, TestLineNum, ...) \
|
#define RUN_TEST(TestFunc, TestLineNum, ...) \
|
||||||
{ \
|
{ \
|
||||||
Unity.CurrentTestName = #TestFunc; \
|
Unity.CurrentTestName = #TestFunc "(" #__VA_ARGS__ ")"; \
|
||||||
Unity.CurrentTestLineNumber = TestLineNum; \
|
Unity.CurrentTestLineNumber = TestLineNum; \
|
||||||
Unity.NumberOfTests++; \
|
Unity.NumberOfTests++; \
|
||||||
if (TEST_PROTECT()) \
|
if (TEST_PROTECT()) \
|
||||||
|
|||||||
Reference in New Issue
Block a user