summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-11-01 18:24:08 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-11-01 18:24:08 (GMT)
commit24f2310b1284c569ea277be00f57248bfd306378 (patch)
treea28e3e8ec585c963f73fc4ed1294f30f940e3a34 /test
parentecaf22fa0450205a508c961b59dbe616d0449b0a (diff)
downloadhdf5-24f2310b1284c569ea277be00f57248bfd306378.zip
hdf5-24f2310b1284c569ea277be00f57248bfd306378.tar.gz
hdf5-24f2310b1284c569ea277be00f57248bfd306378.tar.bz2
[svn-r14229] Description:
Change H5O[gs]et_comment to H5O[gs]et_comment_by_name and re-add simpler forms of H5O[gs]et_comment. Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'test')
-rw-r--r--test/dsets.c4
-rw-r--r--test/links.c4
-rw-r--r--test/stab.c4
-rw-r--r--test/trefer.c4
-rw-r--r--test/tunicode.c8
5 files changed, 12 insertions, 12 deletions
diff --git a/test/dsets.c b/test/dsets.c
index d7bfe8f..8719441 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -214,7 +214,7 @@ test_create(hid_t file)
if(H5Dclose(dataset) < 0) goto error;
/* Add a comment to the dataset */
- status = H5Oset_comment(file, DSET_DEFAULT_NAME, "This is a dataset", H5P_DEFAULT);
+ status = H5Oset_comment_by_name(file, DSET_DEFAULT_NAME, "This is a dataset", H5P_DEFAULT);
if(status < 0) goto error;
/*
@@ -6437,7 +6437,7 @@ main(void)
/* Cause the library to emit initial messages */
if((grp = H5Gcreate2(file, "emit diagnostics", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
- if(H5Oset_comment(grp, ".", "Causes diagnostic messages to be emitted", H5P_DEFAULT) < 0)
+ if(H5Oset_comment(grp, "Causes diagnostic messages to be emitted") < 0)
goto error;
if(H5Gclose(grp) < 0)
goto error;
diff --git a/test/links.c b/test/links.c
index 8a8ab3a..0a164d9 100644
--- a/test/links.c
+++ b/test/links.c
@@ -3316,8 +3316,8 @@ external_link_closing(hid_t fapl, hbool_t new_format)
"elink/elink/elink/elink_copied2", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
/* Test H5Gset and get comment */
- if(H5Oset_comment(fid1, "elink/elink/elink/group1_moved", "comment", H5P_DEFAULT) < 0) FAIL_STACK_ERROR
- if(H5Oget_comment(fid1, "elink/elink/elink/group1_moved", buf, sizeof(buf), H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oset_comment_by_name(fid1, "elink/elink/elink/group1_moved", "comment", H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_comment_by_name(fid1, "elink/elink/elink/group1_moved", buf, sizeof(buf), H5P_DEFAULT) < 0) FAIL_STACK_ERROR
if(HDstrcmp(buf, "comment")) TEST_ERROR
/* Test H5*open */
diff --git a/test/stab.c b/test/stab.c
index 6f5a18b..732ac5b 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -111,7 +111,7 @@ test_misc(hid_t fapl, hbool_t new_format)
if((g1 = H5Gcreate2(fid, "test_1a", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if((g2 = H5Gcreate2(g1, "sub_1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if((g3 = H5Gcreate2(fid, "test_1b", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oset_comment(g3, ".", "hello world", H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Oset_comment(g3, "hello world") < 0) TEST_ERROR
if(H5Gclose(g1) < 0) TEST_ERROR
if(H5Gclose(g2) < 0) TEST_ERROR
if(H5Gclose(g3) < 0) TEST_ERROR
@@ -120,7 +120,7 @@ test_misc(hid_t fapl, hbool_t new_format)
if((g1 = H5Gopen2(fid, "/test_1a", H5P_DEFAULT)) < 0) TEST_ERROR
if((g2 = H5Gopen2(fid, "/test_1a/sub_1", H5P_DEFAULT)) < 0) TEST_ERROR
if((g3 = H5Gopen2(fid, "/test_1b", H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Oget_comment(g3, "././.", comment, sizeof comment, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Oget_comment_by_name(g3, "././.", comment, sizeof comment, H5P_DEFAULT) < 0) TEST_ERROR
if(HDstrcmp(comment, "hello world")) {
H5_FAILED();
puts(" Read the wrong comment string from the group.");
diff --git a/test/trefer.c b/test/trefer.c
index e3ffd76..70ad2e7 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -111,7 +111,7 @@ test_reference_obj(void)
CHECK(group, FAIL, "H5Gcreate2");
/* Set group's comment */
- ret = H5Oset_comment(group, ".", write_comment, H5P_DEFAULT);
+ ret = H5Oset_comment(group, write_comment);
CHECK(ret, FAIL, "H5Oset_comment");
/* Create a dataset (inside Group1) */
@@ -250,7 +250,7 @@ test_reference_obj(void)
CHECK(group, FAIL, "H5Rdereference");
/* Get group's comment */
- ret = H5Oget_comment(group, ".", read_comment, (size_t)10, H5P_DEFAULT);
+ ret = H5Oget_comment(group, read_comment, (size_t)10);
CHECK(ret, FAIL, "H5Oget_comment");
/* Check for correct comment value */
diff --git a/test/tunicode.c b/test/tunicode.c
index a5f1309..767928e 100644
--- a/test/tunicode.c
+++ b/test/tunicode.c
@@ -398,10 +398,10 @@ void test_objnames(hid_t fid, const char* string)
/* Set a comment on the group to test that we can access the group
* Also test that UTF-8 comments can be read.
*/
- ret = H5Oset_comment(fid, string, string, H5P_DEFAULT);
- CHECK(ret, FAIL, "H5Oset_comment");
- ret = H5Oget_comment(fid, string, read_buf, (size_t)MAX_STRING_LENGTH, H5P_DEFAULT);
- CHECK(ret, FAIL, "H5Oget_comment");
+ ret = H5Oset_comment_by_name(fid, string, string, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Oset_comment_by_name");
+ ret = H5Oget_comment_by_name(fid, string, read_buf, (size_t)MAX_STRING_LENGTH, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Oget_comment_by_name");
ret = H5Gclose(grp_id);
CHECK(ret, FAIL, "H5Gclose");