Skip to content

Commit b512a1c

Browse files
committed
Flesh out documentation for command line options for runner generator.
1 parent 2777955 commit b512a1c

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

docs/UnityHelperScriptsGuide.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ Define this option with C code to be executed _before any_ test cases are run.
126126
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.
127127
The linker will look for this symbol and fall back to a Unity-provided stub if it is not found.
128128

129+
This option can also be specified at the command prompt as `--suite_setup=""`
130+
129131
##### `:suite_teardown`
130132

131133
Define this option with C code to be executed _after all_ test cases have finished.
@@ -136,6 +138,8 @@ You can normally just return `num_failures`.
136138
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.
137139
The linker will look for this symbol and fall back to a Unity-provided stub if it is not found.
138140

141+
This option can also be specified at the command prompt as `--suite_teardown=""`
142+
139143
##### `:enforce_strict_ordering`
140144

141145
This option should be defined if you have the strict order feature enabled in CMock (see CMock documentation).
@@ -146,6 +150,8 @@ If you provide the same YAML to the generator as used in CMock's configuration,
146150

147151
This option should be defined if you are mixing C and CPP and want your test runners to automatically include extern "C" support when they are generated.
148152

153+
This option can also be specified at the command prompt as `--externc`
154+
149155
##### `:mock_prefix` and `:mock_suffix`
150156

151157
Unity automatically generates calls to Init, Verify and Destroy for every file included in the main test file that starts with the given mock prefix and ends with the given mock suffix, file extension not included.
@@ -170,8 +176,11 @@ Or as a yaml file:
170176

171177
If you are using CMock, it is very likely that you are already passing an array of plugins to CMock.
172178
You can just use the same array here.
179+
173180
This script will just ignore the plugins that don't require additional support.
174181

182+
This option can also be specified at the command prompt as `--cexception`
183+
175184
##### `:include_extensions`
176185

177186
This option specifies the pattern for matching acceptable header file extensions.
@@ -200,6 +209,8 @@ You can see list of supported macros list in the
200209
[Parameterized tests provided macros](#parameterized-tests-provided-macros)
201210
section that follows.
202211

212+
This option can also be specified at the command prompt as `--use_param_tests=1`
213+
203214
##### `:cmdline_args`
204215

205216
When set to `true`, the generated test runner can accept a number of
@@ -224,18 +235,26 @@ These are the available options:
224235

225236
Override the default test `setUp` function name.
226237

238+
This option can also be specified at the command prompt as `--setup_name=""`
239+
227240
##### `:teardown_name`
228241

229242
Override the default test `tearDown` function name.
230243

244+
This option can also be specified at the command prompt as `--teardown_name=""`
245+
231246
##### `:test_reset_name`
232247

233248
Override the default test `resetTest` function name.
234249

250+
This option can also be specified at the command prompt as `--test_reset_name=""`
251+
235252
##### `:test_verify_name`
236253

237254
Override the default test `verifyTest` function name.
238255

256+
This option can also be specified at the command prompt as `--test_verify_name=""`
257+
239258
##### `:main_name`
240259

241260
Override the test's `main()` function name (from `main` to whatever is specified).
@@ -245,6 +264,8 @@ with `main_` as the "main" function.
245264
To clarify, if `:main_name == :auto` and the test filename is "test_my_project.c", then the
246265
generated function name will be `main_test_my_project(int argc, char** argv)`.
247266

267+
This option can also be specified at the command prompt as `--main_name=""`
268+
248269
##### `main_export_decl`
249270

250271
Provide any `cdecl` for the `main()` test function. Is empty by default.
@@ -254,6 +275,8 @@ Provide any `cdecl` for the `main()` test function. Is empty by default.
254275
If `true`, the `UnityBegin` and `UnityEnd` function will not be called for
255276
Unity test state setup and cleanup.
256277

278+
This option can also be specified at the command prompt as `--omit_begin_end`
279+
257280
#### Parameterized tests provided macros
258281

259282
Unity provides support for few param tests generators, that can be combined

0 commit comments

Comments
 (0)