Update description of 'create_error_stubs'

Change-Id: Ica84be72a229a4fd90e3d5ce0b3449722699f637
This commit is contained in:
Roland Stahn
2025-06-11 12:55:28 +02:00
parent c9154a19dd
commit 0cefcf05f9
2 changed files with 17 additions and 17 deletions
+4 -4
View File
@@ -1,8 +1,8 @@
[submodule "vendor/unity"]
path = vendor/unity
url = https://github.com/throwtheswitch/unity.git
branch = master
[submodule "vendor/c_exception"]
path = vendor/c_exception
url = https://github.com/throwtheswitch/cexception.git
branch = master
[submodule "vendor/unity"]
path = vendor/unity
url = https://github.com/throwtheswitch/unity.git
branch = master
+5 -5
View File
@@ -424,20 +424,20 @@ from the defaults. We've tried to specify what the defaults are below.
New users of CMock sometimes struggle with the concept that CMock is
generating differently named interface functions for a mock depending
on whether a function to be mocked has a return value or not (see
description of the plugins *Expect*, *ExpectAnyArgs*, *Array*, *Ignore*,
*IgnoreStateless* above). They are looking e.g. for a function `func_Expect()`
description of the plugins `:Expect`, `:ExpectAnyArgs`, `:Array`, `:Ignore`,
`:IgnoreStateless` above). They are looking e.g. for a function `func_Expect()`
while CMock generated the function `func_ExpectAndReturn()` instead.
This has proven to be a significant hurdle, because it is not easy to
spot the slightly different named function within the generated mock.
Therefore since release v2.6.0 CMock is generating *both* functions
Therefore CMock (v2.6.0 and newer) is generating *both* functions
per default, although one of them has only a "stub" functionality:
it is aborting the testcase when called with a helpful error message
on call it will always fail the test emitting a helpful error message
pointing towards the correct function.
Experienced CMock users on the other hand might prefer the original
behavior, where no additional error stubs are generated - e.g. to
ensure code completion offers only "real" functionality of the mock.
In this case the option `:create_error_stubs` should be set to false.
In this case, the option `:create_error_stubs` can be set to false.
* default: true