# [PATCH] unit-tests/test-lib: fix typo in check_pointer_eq() description

3 messages from 2024-07-29 to 2024-07-29. Participants: Kousik Sanagavarapu, Eric Sunshine.
Thread: https://gitlist.dev/t/61858

## Kousik Sanagavarapu, 2024-07-29 04:13

Subject: [PATCH] unit-tests/test-lib: fix typo in check_pointer_eq() description
Message-ID: <20240729041435.7618-1-five231003@gmail.com>
URL: https://gitlist.dev/e/20240729041435.7618-1-five231003%40gmail.com

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

Signed-off-by: Kousik Sanagavarapu <five231003@gmail.com>
---
 t/unit-tests/test-lib.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/t/unit-tests/test-lib.h b/t/unit-tests/test-lib.h
index 2de6d715d5..c59f646fd9 100644
--- a/t/unit-tests/test-lib.h
+++ b/t/unit-tests/test-lib.h
@@ -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),			\
-- 
2.46.0.rc2.1.g1fdd4dfe68


```

## Eric Sunshine, 2024-07-29 04:26

Subject: Re: [PATCH] unit-tests/test-lib: fix typo in check_pointer_eq() description
Message-ID: <CAPig+cShnMPrtvaYqQS33qmpDu9VDyFK5jADJ995s7vNJB2p4g@mail.gmail.com>
URL: https://gitlist.dev/e/CAPig%2BcShnMPrtvaYqQS33qmpDu9VDyFK5jADJ995s7vNJB2p4g%40mail.gmail.com
In-Reply-To: <20240729041435.7618-1-five231003@gmail.com>

```
On Mon, Jul 29, 2024 at 12:14 AM Kousik Sanagavarapu
<five231003@gmail.com> wrote:
> The comment surrounding chech_pointer_eq() should explain about what
> this function does instead of explaining check_int().  Correct this.

s/chech/check/

> Signed-off-by: Kousik Sanagavarapu <five231003@gmail.com>

```

## Kousik Sanagavarapu, 2024-07-29 04:32

Subject: [PATCH v2] unit-tests/test-lib: fix typo in check_pointer_eq() description
Message-ID: <20240729043303.3486-1-five231003@gmail.com>
URL: https://gitlist.dev/e/20240729043303.3486-1-five231003%40gmail.com
In-Reply-To: <20240729041435.7618-1-five231003@gmail.com>

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

Signed-off-by: Kousik Sanagavarapu <five231003@gmail.com>
---
 t/unit-tests/test-lib.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/t/unit-tests/test-lib.h b/t/unit-tests/test-lib.h
index 2de6d715d5..c59f646fd9 100644
--- a/t/unit-tests/test-lib.h
+++ b/t/unit-tests/test-lib.h
@@ -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),			\
-- 
2.46.0.rc2.1.g1fdd4dfe68


```
