提交 04c383ea 编写于 作者: M Martin Kletzander

tests: fix documentation for mocking methods

It looks like it was copy-pasted, so in case anyone wonders what some of
those methods do without looking at them, and for the sake of
completeness, fix them.
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
上级 6d5ba6b1
...@@ -175,8 +175,8 @@ ...@@ -175,8 +175,8 @@
* @retval: the return value * @retval: the return value
* @...: pairs of parameter type and parameter name * @...: pairs of parameter type and parameter name
* *
* Define a replacement for @name which invokes wrap_@name * Define a replacement for @name which doesn't invoke anything, just
* forwarding on all args, and passing back the return value. * returns @retval.
*/ */
# define VIR_MOCK_STUB_RET_ARGS(name, rettype, retval, ...) \ # define VIR_MOCK_STUB_RET_ARGS(name, rettype, retval, ...) \
rettype name(VIR_MOCK_ARGTYPENAMES_UNUSED(__VA_ARGS__)) \ rettype name(VIR_MOCK_ARGTYPENAMES_UNUSED(__VA_ARGS__)) \
...@@ -188,9 +188,10 @@ ...@@ -188,9 +188,10 @@
* VIR_MOCK_STUB_RET_VOID: * VIR_MOCK_STUB_RET_VOID:
* @name: the symbol name to replace * @name: the symbol name to replace
* @rettype: the return type * @rettype: the return type
* @retval: value to return
* *
* Define a replacement for @name which invokes wrap_@name * Define a replacement for @name which doesn't invoke anything, just
* with no arguments, and passing back the return value. * returns @retval.
*/ */
# define VIR_MOCK_STUB_RET_VOID(name, rettype, retval) \ # define VIR_MOCK_STUB_RET_VOID(name, rettype, retval) \
rettype name(void) \ rettype name(void) \
...@@ -203,8 +204,8 @@ ...@@ -203,8 +204,8 @@
* @name: the symbol name to replace * @name: the symbol name to replace
* @...: pairs of parameter type and parameter name * @...: pairs of parameter type and parameter name
* *
* Define a replacement for @name which invokes wrap_@name * Define a replacement for @name which doesn't invoke or return
* forwarding on all args, but with no return value. * anything.
*/ */
# define VIR_MOCK_STUB_VOID_ARGS(name, ...) \ # define VIR_MOCK_STUB_VOID_ARGS(name, ...) \
void name(VIR_MOCK_ARGTYPENAMES_UNUSED(__VA_ARGS__)) \ void name(VIR_MOCK_ARGTYPENAMES_UNUSED(__VA_ARGS__)) \
...@@ -217,8 +218,8 @@ ...@@ -217,8 +218,8 @@
* VIR_MOCK_STUB_VOID_VOID: * VIR_MOCK_STUB_VOID_VOID:
* @name: the symbol name to replace * @name: the symbol name to replace
* *
* Define a replacement for @name which invokes wrap_@name * Define a replacement for @name which doesn't invoke or return
* with no arguments and with no return value * anything.
*/ */
# define VIR_MOCK_STUB_VOID_VOID(name) \ # define VIR_MOCK_STUB_VOID_VOID(name) \
void name(void) \ void name(void) \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册