summaryrefslogtreecommitdiffstats
path: root/c++/test/tattr.cpp
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2015-04-22 22:31:12 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2015-04-22 22:31:12 (GMT)
commite0e28a7aae2fabf3ae9d03a1bd5809176935466a (patch)
treea6b840f4c13522aecdd504d16ee5a265e2abad27 /c++/test/tattr.cpp
parent65b3bc2a937337239ceede5e39261c6b2ba4dc69 (diff)
downloadhdf5-e0e28a7aae2fabf3ae9d03a1bd5809176935466a.zip
hdf5-e0e28a7aae2fabf3ae9d03a1bd5809176935466a.tar.gz
hdf5-e0e28a7aae2fabf3ae9d03a1bd5809176935466a.tar.bz2
[svn-r26894] Bring revisions #26459 - #26785 from trunk to revise_chunks.
h5committested.
Diffstat (limited to 'c++/test/tattr.cpp')
-rw-r--r--c++/test/tattr.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp
index 407e6a8..c9422ce 100644
--- a/c++/test/tattr.cpp
+++ b/c++/test/tattr.cpp
@@ -741,12 +741,26 @@ static void test_attr_compound_read()
// Verify name
H5std_string attr_name = attr.getName();
verify_val(attr_name, ATTR4_NAME, "Attribute::getName", __LINE__, __FILE__);
- PASSED();
} // end try block
catch (Exception E) {
issue_fail_msg("test_attr_compound_read()", __LINE__, __FILE__, E.getCDetailMsg());
}
+
+ try
+ {
+ // Now, try truncating the file to make sure reference counting is good.
+ // If any references to ids in the previous block are left unterminated,
+ // the truncating will fail, because the file will not be closed in
+ // the file.close() above.
+ H5File file1(FILE_COMPOUND, H5F_ACC_TRUNC);
+
+ PASSED();
+ } // end try block
+
+ catch (FileIException E) {
+ issue_fail_msg("test_attr_compound_read()", __LINE__, __FILE__, "Unable to truncate file, possibly because some objects are left opened");
+ }
} // test_attr_compound_read()
/****************************************************************