[PATCH] tests: fix documentation for mocking methods

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 tests/virmock.h | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/tests/virmock.h b/tests/virmock.h
index 8352e30..a69c836 100644
--- a/tests/virmock.h
+++ b/tests/virmock.h
@@ -175,8 +175,8 @@
  * @retval: the return value
  * @...: pairs of parameter type and parameter name
  *
- * Define a replacement for @name which invokes wrap_@name
- * forwarding on all args, and passing back the return value.
+ * Define a replacement for @name which doesn't invoke anything, just
+ * returns @retval.
  */
 # define VIR_MOCK_STUB_RET_ARGS(name, rettype, retval, ...)             \
     rettype name(VIR_MOCK_ARGTYPENAMES_UNUSED(__VA_ARGS__))             \
@@ -188,9 +188,10 @@
  * VIR_MOCK_STUB_RET_VOID:
  * @name: the symbol name to replace
  * @rettype: the return type
+ * @retval: value to return
  *
- * Define a replacement for @name which invokes wrap_@name
- * with no arguments, and passing back the return value.
+ * Define a replacement for @name which doesn't invoke anything, just
+ * returns @retval.
  */
 # define VIR_MOCK_STUB_RET_VOID(name, rettype, retval)              \
     rettype name(void)                                              \
@@ -203,8 +204,8 @@
  * @name: the symbol name to replace
  * @...: pairs of parameter type and parameter name
  *
- * Define a replacement for @name which invokes wrap_@name
- * forwarding on all args, but with no return value.
+ * Define a replacement for @name which doesn't invoke or return
+ * anything.
  */
 # define VIR_MOCK_STUB_VOID_ARGS(name, ...)                         \
     void name(VIR_MOCK_ARGTYPENAMES_UNUSED(__VA_ARGS__))            \
@@ -217,8 +218,8 @@
  * VIR_MOCK_STUB_VOID_VOID:
  * @name: the symbol name to replace
  *
- * Define a replacement for @name which invokes wrap_@name
- * with no arguments and with no return value
+ * Define a replacement for @name which doesn't invoke or return
+ * anything.
  */
 # define VIR_MOCK_STUB_VOID_VOID(name)                              \
     void name(void)                                                 \
-- 
2.1.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]