diff options
author | Max Bruckner <max@maxbruckner.de> | 2017-11-28 03:15:50 +0100 |
---|---|---|
committer | Max Bruckner <max@maxbruckner.de> | 2017-11-28 03:15:50 +0100 |
commit | 0476590a0cedab0d160247c69ce9b5bbbdaae5cd (patch) | |
tree | 64900c146c704f737e64c060bde5c439fa56d36c /tests/unity/docs/UnityHelperScriptsGuide.md | |
parent | 11844dd5a6be2e16e6107c1ab9c51b81a4910306 (diff) | |
parent | da8c48668da6e82f9cbea94e4be04d74162e71fa (diff) | |
download | cjson-0476590a0cedab0d160247c69ce9b5bbbdaae5cd.tar.gz cjson-0476590a0cedab0d160247c69ce9b5bbbdaae5cd.zip |
Update Unity to 2.4.3
Diffstat (limited to 'tests/unity/docs/UnityHelperScriptsGuide.md')
-rw-r--r-- | tests/unity/docs/UnityHelperScriptsGuide.md | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/tests/unity/docs/UnityHelperScriptsGuide.md b/tests/unity/docs/UnityHelperScriptsGuide.md index 3a93009..4242990 100644 --- a/tests/unity/docs/UnityHelperScriptsGuide.md +++ b/tests/unity/docs/UnityHelperScriptsGuide.md @@ -124,7 +124,7 @@ demonstrates using a Ruby hash. ##### `:includes` -This option specifies an array of file names to be ?#include?'d at the top of +This option specifies an array of file names to be `#include`'d at the top of your runner C file. You might use it to reference custom types or anything else universally needed in your generated runners. @@ -133,11 +133,23 @@ universally needed in your generated runners. Define this option with C code to be executed _before any_ test cases are run. +Alternatively, if your C compiler supports weak symbols, you can leave this +option unset and instead provide a `void suiteSetUp(void)` function in your test +suite. The linker will look for this symbol and fall back to a Unity-provided +stub if it is not found. + ##### `:suite_teardown` -Define this option with C code to be executed ?after all?test cases have -finished. +Define this option with C code to be executed _after all_ test cases have +finished. An integer variable `num_failures` is available for diagnostics. +The code should end with a `return` statement; the value returned will become +the exit code of `main`. You can normally just return `num_failures`. + +Alternatively, if your C compiler supports weak symbols, you can leave this +option unset and instead provide a `int suiteTearDown(int num_failures)` +function in your test suite. The linker will look for this symbol and fall +back to a Unity-provided stub if it is not found. ##### `:enforce_strict_ordering` |