diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2017-05-13 11:00:33 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2017-05-13 11:00:33 (GMT) |
commit | 8b1a53896565cafca3795d139a37148f89bf928d (patch) | |
tree | c4df84bc37434a0d4df14e73d65723c77e32d7ed /c++/test/tattr.cpp | |
parent | 77eb59b4343c9c9d6786cf620ea4d9c498af279f (diff) | |
download | hdf5-8b1a53896565cafca3795d139a37148f89bf928d.zip hdf5-8b1a53896565cafca3795d139a37148f89bf928d.tar.gz hdf5-8b1a53896565cafca3795d139a37148f89bf928d.tar.bz2 |
Add H5Lexists wrappers
Description:
Added wrappers H5Location::exists() for H5Lexists.
Added new class LinkAccPropList to be used by H5Location::exists()
Rearranged source files in Makefile.am
Platforms tested:
Linux/32 2.6 (jam)
Linux/64 (platypus)
Darwin (osx1010test)
Diffstat (limited to 'c++/test/tattr.cpp')
-rw-r--r-- | c++/test/tattr.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp index bb33b2b..70c4003 100644 --- a/c++/test/tattr.cpp +++ b/c++/test/tattr.cpp @@ -1561,11 +1561,20 @@ static void test_attr_exists() // Open a group. Group group = fid1.openGroup(GROUP1_NAME); - // Check for existence of attribute + // Check for existence of attribute, Group::attrExists attr_exists = group.attrExists(ATTR2_NAME); if (attr_exists == false) throw InvalidActionException("H5File::attrExists", "group, ATTR2_NAMEAttribute should exist but does not"); + // Open attribute + Attribute attr = group.openAttribute(ATTR2_NAME); + + // Test the existence of a name using attribute as location, + // Attribute::nameExists + bool name_exists = attr.nameExists(GROUP1_NAME); + if (name_exists == false) + throw InvalidActionException("Attribute::nameExists", "group GROUP1_NAME should exist but does not"); + PASSED(); } // end try block |