summaryrefslogtreecommitdiffstats
path: root/test/tfile.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2014-07-21 16:58:13 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2014-07-21 16:58:13 (GMT)
commit35de6099e0c9a785d534044655c47aa33cd766b5 (patch)
tree800d4b6280afcec6ba3e41e252432ffab4376fd4 /test/tfile.c
parent52ceb04b1f1fd6598a8e7b2f7083e59a969e50a5 (diff)
downloadhdf5-35de6099e0c9a785d534044655c47aa33cd766b5.zip
hdf5-35de6099e0c9a785d534044655c47aa33cd766b5.tar.gz
hdf5-35de6099e0c9a785d534044655c47aa33cd766b5.tar.bz2
[svn-r25452] realign tests with trunk.
Diffstat (limited to 'test/tfile.c')
-rw-r--r--test/tfile.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/test/tfile.c b/test/tfile.c
index dfdbf25..213c6b0 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -709,6 +709,7 @@ test_file_close(void)
ret = H5Fclose(fid2);
CHECK(ret, FAIL, "H5Fclose");
+
/* Test behavior while opening file multiple times with file close
* degree WEAK */
ret = H5Pset_fclose_degree(fapl_id, H5F_CLOSE_WEAK);
@@ -759,6 +760,7 @@ test_file_close(void)
ret = H5Gclose(group_id3);
CHECK(ret, FAIL, "H5Gclose");
+
/* Test behavior while opening file multiple times with file close
* degree DEFAULT */
ret = H5Pset_fclose_degree(fapl_id, H5F_CLOSE_DEFAULT);
@@ -1110,14 +1112,13 @@ test_get_file_id(void)
*/
group_id = H5Gcreate2(fid, GRP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(group_id, FAIL, "H5Gcreate2");
-
+
/* Test H5Iget_file_id() */
check_file_id(fid, group_id);
/* Close the file and get file ID from the group ID */
ret = H5Fclose(fid);
CHECK(ret, FAIL, "H5Fclose");
- //printf ("REF COUNT = %d\n", H5I_get_ref (fid, FALSE));
/* Test H5Iget_file_id() */
check_file_id(-1, group_id);
@@ -1229,6 +1230,7 @@ check_file_id(hid_t fid, hid_t object_id)
* And close this duplicated ID
*/
new_fid = H5Iget_file_id(object_id);
+
if(fid >=0)
VERIFY(new_fid, fid, "H5Iget_file_id");
else
@@ -1257,7 +1259,7 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1,
fid4 = H5Fcreate(FILE3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
CHECK(fid4, FAIL, "H5Fcreate");
- /* test object count of all files open */
+ /* test object count of all files IDs open */
oid_count = H5Fget_obj_count(H5F_OBJ_ALL, H5F_OBJ_FILE);
CHECK(oid_count, FAIL, "H5Fget_obj_count");
VERIFY(oid_count, OBJ_ID_COUNT_4, "H5Fget_obj_count");
@@ -1286,7 +1288,7 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1,
oid_count = H5Fget_obj_count(H5F_OBJ_ALL, H5F_OBJ_ALL);
CHECK(oid_count, FAIL, "H5Fget_obj_count");
VERIFY(oid_count, OBJ_ID_COUNT_8, "H5Fget_obj_count");
-
+
if(oid_count > 0) {
hid_t *oid_list;
@@ -1304,13 +1306,13 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1,
switch(id_type) {
case H5I_FILE:
if(oid_list[i] != fid1 && oid_list[i] != fid2
- && oid_list[i] != fid3 && oid_list[i] != fid4)
+ && oid_list[i] != fid3 && oid_list[i] != fid4)
ERROR("H5Fget_obj_ids");
break;
case H5I_GROUP:
if(oid_list[i] != gid1 && oid_list[i] != gid2
- && oid_list[i] != gid3)
+ && oid_list[i] != gid3)
ERROR("H5Fget_obj_ids");
break;
@@ -1322,6 +1324,7 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1,
ERROR("H5Fget_obj_ids");
} /* end switch */
} /* end for */
+
HDfree(oid_list);
} /* end if */
} /* end if */