summaryrefslogtreecommitdiffstats
path: root/test/unlink.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-08-28 19:47:00 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-08-28 19:47:00 (GMT)
commita84811bfb889762150014188680fad0ce05877ba (patch)
treee2dac8f7d6d8a7c0e306d3706e4433bd31e70f0c /test/unlink.c
parent2785c61b8daddefe90c38f7e57d75957d906e8b8 (diff)
downloadhdf5-a84811bfb889762150014188680fad0ce05877ba.zip
hdf5-a84811bfb889762150014188680fad0ce05877ba.tar.gz
hdf5-a84811bfb889762150014188680fad0ce05877ba.tar.bz2
[svn-r14117] Description:
Move H5Glink() into "deprecated routines" section, replacing internal usage with H5Lcreate_hard/H5Lcreate_soft. Tested on: FreeBSD/32 6.2 (duty) FreeBSD/64 6.2 (liberty) Solaris/32 5.10 (linew)
Diffstat (limited to 'test/unlink.c')
-rw-r--r--test/unlink.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/unlink.c b/test/unlink.c
index f2391b1..87ee412 100644
--- a/test/unlink.c
+++ b/test/unlink.c
@@ -178,9 +178,9 @@ test_many(hid_t file)
/* Create a bunch of names and unlink them in order */
TESTING("forward unlink");
- for (i=0; i<how_many; i++) {
+ for(i = 0; i < how_many; i++) {
sprintf(name, "obj_%05d", i);
- if (H5Glink(work, H5L_TYPE_HARD, "/test_many_foo", name) < 0) TEST_ERROR
+ if(H5Glink2(work, "/test_many_foo", H5L_TYPE_HARD, H5G_SAME_LOC, name) < 0) TEST_ERROR
}
for (i=0; i<how_many; i++) {
sprintf(name, "obj_%05d", i);
@@ -190,9 +190,9 @@ test_many(hid_t file)
/* Create a bunch of names and unlink them in reverse order */
TESTING("backward unlink");
- for (i=0; i<how_many; i++) {
+ for(i = 0; i < how_many; i++) {
sprintf(name, "obj_%05d", i);
- if (H5Glink(work, H5L_TYPE_HARD, "/test_many_foo", name) < 0) TEST_ERROR
+ if(H5Glink2(work, "/test_many_foo", H5L_TYPE_HARD, H5G_SAME_LOC, name) < 0) TEST_ERROR
}
for (i=how_many-1; i>=0; --i) {
sprintf(name, "obj_%05d", i);
@@ -202,9 +202,9 @@ test_many(hid_t file)
/* Create a bunch of names and unlink them from both directions */
TESTING("inward unlink");
- for (i=0; i<how_many; i++) {
+ for(i = 0; i < how_many; i++) {
sprintf(name, "obj_%05d", i);
- if (H5Glink(work, H5L_TYPE_HARD, "/test_many_foo", name) < 0) TEST_ERROR
+ if(H5Glink2(work, "/test_many_foo", H5L_TYPE_HARD, H5G_SAME_LOC, name) < 0) TEST_ERROR
}
for (i=0; i<how_many; i++) {
if (i%2) {
@@ -218,9 +218,9 @@ test_many(hid_t file)
/* Create a bunch of names and unlink them from the midle */
TESTING("outward unlink");
- for (i=0; i<how_many; i++) {
+ for(i = 0; i < how_many; i++) {
sprintf(name, "obj_%05d", i);
- if (H5Glink(work, H5L_TYPE_HARD, "/test_many_foo", name) < 0) TEST_ERROR
+ if(H5Glink2(work, "/test_many_foo", H5L_TYPE_HARD, H5G_SAME_LOC, name) < 0) TEST_ERROR
}
for (i=how_many-1; i>=0; --i) {
if (i%2) {
@@ -269,7 +269,7 @@ test_symlink(hid_t file)
/* Create a test group and symlink */
if((work = H5Gcreate2(file, "/test_symlink", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Glink(work, H5L_TYPE_SOFT, "link_value", "link") < 0) TEST_ERROR
+ if(H5Lcreate_soft("link_value", work, "link", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
if(H5Gunlink(work, "link") < 0) TEST_ERROR
/* Cleanup */
@@ -320,8 +320,8 @@ test_rename(hid_t file)
/* Try renaming a symlink */
TESTING("symlink renaming");
- if (H5Glink(work, H5L_TYPE_SOFT, "link_value", "link_one") < 0) TEST_ERROR
- if (H5Gmove(work, "link_one", "link_two") < 0) TEST_ERROR
+ if(H5Lcreate_soft("link_value", work, "link_one", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Gmove(work, "link_one", "link_two") < 0) TEST_ERROR
PASSED();
/* Cleanup */