Skip to contentSkip to conversation

unit-tests/test-lib: fix typo in check_pointer_eq() description

PATCH Superseded Kousik Sanagavarapu 2 participants 3 messages Jul 29, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 unit-tests/test-lib: fix typo in check_pointer_eq() description

The comment surrounding chech_pointer_eq() should explain about what this function does instead of explaining check_int(). Correct this.

---
 t/unit-tests/test-lib.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
t/unit-tests/test-lib.h +3 -2
index 2de6d715d5..c59f646fd9 100644
@@ -76,8 +76,9 @@ int test_assert(const char *location, const char *check, int ok);
 int check_bool_loc(const char *loc, const char *check, int ok);
 
 /*
- * Compare two integers. Prints a message with the two values if the
- * comparison fails. NB this is not thread safe.
+ * Compare the equality of two pointers of same type. Prints a message
+ * with the two values if the equality fails. NB this is not thread
+ * safe.
  */
 #define check_pointer_eq(a, b)						\
 	(test__tmp[0].p = (a), test__tmp[1].p = (b),			\
Signature · 1 line
2.46.0.rc2.1.g1fdd4dfe68
#2 lore raw

PATCH v2 1/1 unit-tests/test-lib: fix typo in check_pointer_eq() description

In reply to Kousik Sanagavarapu

The comment surrounding check_pointer_eq() should explain about what this function does instead of explaining check_int(). Correct this.

---
 t/unit-tests/test-lib.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
t/unit-tests/test-lib.h +3 -2
index 2de6d715d5..c59f646fd9 100644
@@ -76,8 +76,9 @@ int test_assert(const char *location, const char *check, int ok);
 int check_bool_loc(const char *loc, const char *check, int ok);
 
 /*
- * Compare two integers. Prints a message with the two values if the
- * comparison fails. NB this is not thread safe.
+ * Compare the equality of two pointers of same type. Prints a message
+ * with the two values if the equality fails. NB this is not thread
+ * safe.
  */
 #define check_pointer_eq(a, b)						\
 	(test__tmp[0].p = (a), test__tmp[1].p = (b),			\
Signature · 1 line
2.46.0.rc2.1.g1fdd4dfe68