summaryrefslogtreecommitdiffstats
path: root/test/trefstr.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/trefstr.c')
-rw-r--r--test/trefstr.c42
1 files changed, 20 insertions, 22 deletions
diff --git a/test/trefstr.c b/test/trefstr.c
index dd76cc1..83e2951 100644
--- a/test/trefstr.c
+++ b/test/trefstr.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -69,7 +67,7 @@ test_refstr_create(void)
/* Try creating a ref-counted string */
rs=H5RS_create("foo");
- CHECK(rs, NULL, "H5RS_create");
+ CHECK_PTR(rs, "H5RS_create");
/* Get the reference count on the string */
count=H5RS_get_count(rs);
@@ -99,7 +97,7 @@ test_refstr_count(void)
/* Try creating a ref-counted string */
rs=H5RS_create("foo");
- CHECK(rs, NULL, "H5RS_create");
+ CHECK_PTR(rs, "H5RS_create");
/* Get the reference count on the string */
count=H5RS_get_count(rs);
@@ -146,7 +144,7 @@ test_refstr_dup(void)
/* Try creating a ref-counted string */
rs1=H5RS_create("foo");
- CHECK(rs1, NULL, "H5RS_create");
+ CHECK_PTR(rs1, "H5RS_create");
/* Get the reference count on the string */
count=H5RS_get_count(rs1);
@@ -154,7 +152,7 @@ test_refstr_dup(void)
/* Duplicate r-string */
rs2=H5RS_dup(rs1);
- CHECK(rs2, NULL, "H5RS_dup");
+ CHECK_PTR(rs2, "H5RS_dup");
/* Get the reference count on the strings */
count=H5RS_get_count(rs1);
@@ -196,11 +194,11 @@ test_refstr_cmp(void)
/* Create first reference counted string */
rs1=H5RS_create("foo");
- CHECK(rs1, NULL, "H5RS_create");
+ CHECK_PTR(rs1, "H5RS_create");
/* Create second reference counted string */
rs2=H5RS_create("foo2");
- CHECK(rs2, NULL, "H5RS_create");
+ CHECK_PTR(rs2, "H5RS_create");
/* Compare the strings in various ways */
cmp=H5RS_cmp(rs1,rs1);
@@ -248,12 +246,12 @@ test_refstr_wrap(void)
/* Wrap ref-counted string around existing buffer */
rs=H5RS_wrap(buf);
- CHECK(rs, NULL, "H5RS_wrap");
+ CHECK_PTR(rs, "H5RS_wrap");
/* Get pointer to raw string in ref-counted string */
s=H5RS_get_str(rs);
- CHECK(s, NULL, "H5RS_get_str");
- VERIFY(s, buf, "wrapping");
+ CHECK_PTR(s, "H5RS_get_str");
+ CHECK_PTR_EQ(s, buf, "wrapping");
cmp=HDstrcmp(s,buf);
VERIFY(cmp, 0, "HDstrcmp");
@@ -266,7 +264,7 @@ test_refstr_wrap(void)
/* Get pointer to raw string in ref-counted string */
s=H5RS_get_str(rs);
- CHECK(s, NULL, "H5RS_get_str");
+ CHECK_PTR(s, "H5RS_get_str");
CHECK(s, buf, "wrapping");
cmp=HDstrcmp(s,buf);
if(cmp<=0)
@@ -301,17 +299,17 @@ test_refstr_own(void)
/* Initialize buffer */
s = (char *)H5FL_BLK_MALLOC(str_buf,HDstrlen("foo") + 1);
- CHECK(s, NULL, "H5FL_BLK_MALLOC");
+ CHECK_PTR(s, "H5FL_BLK_MALLOC");
HDstrcpy(s, "foo");
/* Transfer ownership of dynamically allocated string to ref-counted string */
rs=H5RS_own(s);
- CHECK(rs, NULL, "H5RS_own");
+ CHECK_PTR(rs, "H5RS_own");
/* Get pointer to raw string in ref-counted string */
t=H5RS_get_str(rs);
- CHECK(t, NULL, "H5RS_get_str");
- VERIFY(t, s, "transferring");
+ CHECK_PTR(t, "H5RS_get_str");
+ CHECK_PTR_EQ(t, s, "transferring");
cmp=HDstrcmp(s,t);
VERIFY(cmp, 0, "HDstrcmp");
@@ -324,8 +322,8 @@ test_refstr_own(void)
/* Get pointer to raw string in ref-counted string */
t=H5RS_get_str(rs);
- CHECK(t, NULL, "H5RS_get_str");
- VERIFY(t, s, "transferring");
+ CHECK_PTR(t, "H5RS_get_str");
+ CHECK_PTR_EQ(t, s, "transferring");
cmp=HDstrcmp(t,s);
VERIFY(cmp, 0, "HDstrcmp");