diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2017-05-10 15:20:28 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2017-05-10 15:20:28 (GMT) |
commit | 8df5c966e09c34524c39d4afe71029ef6664d687 (patch) | |
tree | 512f68e03ffaf0a554464bb15a3291781e932bd7 /c++/test | |
parent | 6c161ba4dc7c25da6ecbe98aec10fff7b1365df6 (diff) | |
download | hdf5-8df5c966e09c34524c39d4afe71029ef6664d687.zip hdf5-8df5c966e09c34524c39d4afe71029ef6664d687.tar.gz hdf5-8df5c966e09c34524c39d4afe71029ef6664d687.tar.bz2 |
Improvement of class hierarchy
Description:
- Moved class Attribute to be derived from class H5Location instead of
IdComponent because an attribute id can be used as loc_id in C APIs.
- Copied wrappers of H5A APIs in H5Location into H5Object because H5A
functions do not take an attribute id as loc_id. The original wrappers
will be deprecated in future releases.
- Revised comments
Platforms tested:
Linux/32 2.6 (jam)
Linux/64 (platypus)
Darwin (osx1010test)
Diffstat (limited to 'c++/test')
-rw-r--r-- | c++/test/tfile.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp index bd229d7..6e12dfd 100644 --- a/c++/test/tfile.cpp +++ b/c++/test/tfile.cpp @@ -601,6 +601,18 @@ static void test_file_attribute() n_attrs = dataset.getNumAttrs(); verify_val(n_attrs, 1, "DataSet::getNumAttrs()", __LINE__, __FILE__); + // Get and verify the number of attributes at the location specified + // by a dataset's attribute + n_attrs = 0; + n_attrs = dattr.getNumAttrs(); + verify_val(n_attrs, 1, "Attribute::getNumAttrs()", __LINE__, __FILE__); + + // Get and verify the number of attributes at the location specified + // by a file's attribute + n_attrs = 0; + n_attrs = fattr1.getNumAttrs(); + verify_val(n_attrs, 2, "Attribute::getNumAttrs()", __LINE__, __FILE__); + // Read back attribute's data HDmemset(rdata, 0, sizeof(rdata)); dattr.read(PredType::NATIVE_INT, rdata); |