summaryrefslogtreecommitdiffstats
path: root/test/trefstr.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/trefstr.c')
-rw-r--r--test/trefstr.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/trefstr.c b/test/trefstr.c
index 74455da..d0575ab 100644
--- a/test/trefstr.c
+++ b/test/trefstr.c
@@ -186,7 +186,7 @@ test_refstr_cmp(void)
H5RS_str_t *rs1; /* Ref-counted string created */
H5RS_str_t *rs2; /* Ref-counted string created */
int cmp; /* Comparison value */
- ssize_t len; /* Length of string */
+ size_t len; /* Length of string */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -265,7 +265,9 @@ test_refstr_wrap(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- CHECK(s, buf, "wrapping");
+ if (s == buf)
+ TestErrPrintf("%d: Should not have gotten the same pointer from reference-counted string!\n",
+ __LINE__);
cmp = HDstrcmp(s, buf);
if (cmp <= 0)
TestErrPrintf("%d: string comparison incorrect!\n", __LINE__);
@@ -375,7 +377,7 @@ test_refstr_acat(void)
/* Append a large string to ref-counted string */
large_str = HDmalloc(1024);
- CHECK(large_str, NULL, "HDmalloc");
+ CHECK_PTR(large_str, "HDmalloc");
HDmemset(large_str, 'a', 1024);
large_str[1023] = '\0';
ret = H5RS_acat(rs, large_str);
@@ -386,7 +388,7 @@ test_refstr_acat(void)
CHECK_PTR(s, "H5RS_get_str");
HDsprintf(buf, "%s", "foobar");
large_str2 = HDmalloc(1024 + 6);
- CHECK(large_str2, NULL, "HDmalloc");
+ CHECK_PTR(large_str2, "HDmalloc");
HDstrcpy(large_str2, "foobar");
HDmemset(&large_str2[6], 'a', 1024);
large_str2[1029] = '\0';