diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2011-07-18 21:23:02 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2011-07-18 21:23:02 (GMT) |
commit | 304f19d73093427faa319dc04926461d850032a0 (patch) | |
tree | 0ebc5fc91522e25fcd9057c2bd931aab3452a6ab /test/getname.c | |
parent | cc0486926f52a25a252f560d35fba7d4cf73f521 (diff) | |
download | hdf5-304f19d73093427faa319dc04926461d850032a0.zip hdf5-304f19d73093427faa319dc04926461d850032a0.tar.gz hdf5-304f19d73093427faa319dc04926461d850032a0.tar.bz2 |
[svn-r21117] Issue 2763 - I added a new parameter of object access property list to the function H5Rdereference. It's called H5Rdereference2 now. H5Rdereference function has been deprecated to H5Rdereference1. I also added some test cases in trefer.c.
Tested on jam, heiwa, and koala.
Diffstat (limited to 'test/getname.c')
-rw-r--r-- | test/getname.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/test/getname.c b/test/getname.c index 1e50dcc..2a3145b 100644 --- a/test/getname.c +++ b/test/getname.c @@ -2518,7 +2518,7 @@ test_obj_ref(hid_t fapl) FAIL_STACK_ERROR TESTING("getting path to normal dataset in root group"); - if((dataset2 = H5Rdereference(dataset, H5R_OBJECT, &wbuf[0])) < 0) FAIL_STACK_ERROR + if((dataset2 = H5Rdereference2(dataset, H5P_DATASET_ACCESS_DEFAULT, H5R_OBJECT, &wbuf[0])) < 0) FAIL_STACK_ERROR *buf = '\0'; i = H5Iget_name(dataset2, (char*)buf, sizeof(buf)); if(H5Dclose(dataset2) < 0) FAIL_STACK_ERROR @@ -2530,7 +2530,7 @@ test_obj_ref(hid_t fapl) HDmemset(buf, 0, sizeof(buf)); TESTING("getting path to dataset in /Group1"); - if((dataset2 = H5Rdereference(dataset, H5R_OBJECT, &wbuf[1])) < 0) FAIL_STACK_ERROR + if((dataset2 = H5Rdereference2(dataset, H5P_DATASET_ACCESS_DEFAULT, H5R_OBJECT, &wbuf[1])) < 0) FAIL_STACK_ERROR *buf = '\0'; i = H5Iget_name(dataset2, (char*)buf, sizeof(buf)); if(H5Dclose(dataset2) < 0) FAIL_STACK_ERROR @@ -2542,7 +2542,7 @@ test_obj_ref(hid_t fapl) HDmemset(buf, 0, sizeof(buf)); TESTING("getting path to /Group1"); - if((group = H5Rdereference(dataset, H5R_OBJECT, &wbuf[2])) < 0) FAIL_STACK_ERROR + if((group = H5Rdereference2(dataset, H5P_DATASET_ACCESS_DEFAULT, H5R_OBJECT, &wbuf[2])) < 0) FAIL_STACK_ERROR *buf = '\0'; i = H5Iget_name(group, (char*)buf, sizeof(buf)); if(H5Gclose(group) < 0) FAIL_STACK_ERROR @@ -2554,7 +2554,7 @@ test_obj_ref(hid_t fapl) HDmemset(buf, 0, sizeof(buf)); TESTING("getting path to datatype in /Group1"); - if((tid1 = H5Rdereference(dataset, H5R_OBJECT, &wbuf[3])) < 0) FAIL_STACK_ERROR + if((tid1 = H5Rdereference2(dataset, H5P_DATASET_ACCESS_DEFAULT, H5R_OBJECT, &wbuf[3])) < 0) FAIL_STACK_ERROR *buf = '\0'; i = H5Iget_name(tid1, (char*)buf, sizeof(buf)); if(H5Tclose(tid1) < 0) FAIL_STACK_ERROR @@ -2566,7 +2566,7 @@ test_obj_ref(hid_t fapl) HDmemset(buf, 0, sizeof(buf)); TESTING("getting path to dataset in nested group"); - if((dataset2 = H5Rdereference(dataset, H5R_OBJECT, &wbuf[4])) < 0) FAIL_STACK_ERROR + if((dataset2 = H5Rdereference2(dataset, H5P_DATASET_ACCESS_DEFAULT, H5R_OBJECT, &wbuf[4])) < 0) FAIL_STACK_ERROR *buf = '\0'; i = H5Iget_name(dataset2, (char*)buf, sizeof(buf)); if(H5Dclose(dataset2) < 0) FAIL_STACK_ERROR @@ -2578,7 +2578,7 @@ test_obj_ref(hid_t fapl) HDmemset(buf, 0, sizeof(buf)); TESTING("getting path to nested group"); - if((group = H5Rdereference(dataset, H5R_OBJECT, &wbuf[5])) < 0) FAIL_STACK_ERROR + if((group = H5Rdereference2(dataset, H5P_DATASET_ACCESS_DEFAULT, H5R_OBJECT, &wbuf[5])) < 0) FAIL_STACK_ERROR *buf = '\0'; i = H5Iget_name(group, (char*)buf, sizeof(buf)); if(H5Gclose(group) < 0) FAIL_STACK_ERROR @@ -2590,7 +2590,7 @@ test_obj_ref(hid_t fapl) HDmemset(buf, 0, sizeof(buf)); TESTING("getting path to dataset created via hard link"); - if((dataset2 = H5Rdereference(dataset, H5R_OBJECT, &wbuf[6])) < 0) FAIL_STACK_ERROR + if((dataset2 = H5Rdereference2(dataset, H5P_DATASET_ACCESS_DEFAULT, H5R_OBJECT, &wbuf[6])) < 0) FAIL_STACK_ERROR *buf = '\0'; i = H5Iget_name(dataset2, (char*)buf, sizeof(buf)); if(H5Dclose(dataset2) < 0) FAIL_STACK_ERROR @@ -2602,7 +2602,7 @@ test_obj_ref(hid_t fapl) HDmemset(buf, 0, sizeof(buf)); TESTING("getting path to root group"); - if((group = H5Rdereference(dataset, H5R_OBJECT, &wbuf[7])) < 0) FAIL_STACK_ERROR + if((group = H5Rdereference2(dataset, H5P_DATASET_ACCESS_DEFAULT, H5R_OBJECT, &wbuf[7])) < 0) FAIL_STACK_ERROR *buf = '\0'; i = H5Iget_name(group, (char*)buf, sizeof(buf)); if(H5Gclose(group) < 0) FAIL_STACK_ERROR @@ -2617,7 +2617,7 @@ test_obj_ref(hid_t fapl) FAIL_STACK_ERROR TESTING("getting path to dataset hidden by a mounted file"); - if((dataset2 = H5Rdereference(dataset, H5R_OBJECT, &wbuf[4])) < 0) FAIL_STACK_ERROR + if((dataset2 = H5Rdereference2(dataset, H5P_DATASET_ACCESS_DEFAULT, H5R_OBJECT, &wbuf[4])) < 0) FAIL_STACK_ERROR *buf = '\0'; i = H5Iget_name(dataset2, (char*)buf, sizeof(buf)); if(H5Dclose(dataset2) < 0) FAIL_STACK_ERROR @@ -2628,7 +2628,7 @@ test_obj_ref(hid_t fapl) PASSED() /* Now we try unlinking dataset2 from the file and searching for it. It shouldn't be found */ - if((dataset2 = H5Rdereference(dataset, H5R_OBJECT, &wbuf[1])) < 0) + if((dataset2 = H5Rdereference2(dataset, H5P_DATASET_ACCESS_DEFAULT, H5R_OBJECT, &wbuf[1])) < 0) FAIL_STACK_ERROR if(H5Ldelete(fid1, "/Group1/Dataset2", H5P_DEFAULT) < 0) FAIL_STACK_ERROR @@ -2768,7 +2768,7 @@ test_reg_ref(hid_t fapl) TESTING("H5Iget_name to get name from region reference(hyperslab)"); /* Dereference the first reference */ - dsetv_id = H5Rdereference(dsetr_id, H5R_DATASET_REGION, &ref_out[0]); + dsetv_id = H5Rdereference2(dsetr_id, H5P_DATASET_ACCESS_DEFAULT, H5R_DATASET_REGION, &ref_out[0]); /* Get name of the dataset the first region reference points using H5Iget_name */ *buf2 = '\0'; @@ -2789,7 +2789,7 @@ test_reg_ref(hid_t fapl) TESTING("H5Iget_name to get name from region reference(pnt selec)"); /* Dereference the second reference */ - if((dsetv_id = H5Rdereference(dsetr_id, H5R_DATASET_REGION, &ref_out[1])) < 0) TEST_ERROR + if((dsetv_id = H5Rdereference2(dsetr_id, H5P_DATASET_ACCESS_DEFAULT, H5R_DATASET_REGION, &ref_out[1])) < 0) TEST_ERROR /* Get name of the dataset the first region reference points using H5Iget_name */ *buf2 = '\0'; |