summaryrefslogtreecommitdiffstats
path: root/c++/test/tattr.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2014-04-06 22:36:15 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2014-04-06 22:36:15 (GMT)
commita08f75b0737c86d51bbc91538e78b1455eb2cae7 (patch)
treea1e1c4f1cf8ddda6dd0a101af17dc8524ad23050 /c++/test/tattr.cpp
parent70daa61a876274a92c0d43ec0116d68e35d0c2ce (diff)
downloadhdf5-a08f75b0737c86d51bbc91538e78b1455eb2cae7.zip
hdf5-a08f75b0737c86d51bbc91538e78b1455eb2cae7.tar.gz
hdf5-a08f75b0737c86d51bbc91538e78b1455eb2cae7.tar.bz2
[svn-r24969] Description:
- Added wrappers to H5Object for H5Iget_name() to get object's name ssize_t getObjName(char *obj_name, size_t buf_size = 0) const; ssize_t getObjName(H5std_string& obj_name, size_t len = 0) const; H5std_string getObjName() const; - Added tests tobject.cpp - Added to various cleanup_* functions in tests to remove generated files - Added an overload H5I_type_t getHDFObjType() to get object's type Platforms tested: Linux/ppc64 (ostrich) Linux/32 2.6 (jam) SunOS 5.11 (emu) with gmake
Diffstat (limited to 'c++/test/tattr.cpp')
-rw-r--r--c++/test/tattr.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp
index e2e347b..aa412d9 100644
--- a/c++/test/tattr.cpp
+++ b/c++/test/tattr.cpp
@@ -292,6 +292,7 @@ static void test_attr_getname()
HDmemset(fattr1_name, 0, buf_size+1);
ssize_t name_size = 0; // actual length of attribute name
name_size = fattr1.getName(fattr1_name, buf_size+1);
+ verify_val(name_size, FATTR1_NAME.length(), "Attribute::getName", __LINE__, __FILE__);
verify_val((const char*)fattr1_name, FATTR1_NAME, "Attribute::getName", __LINE__, __FILE__);
delete []fattr1_name;
@@ -302,6 +303,7 @@ static void test_attr_getname()
fattr1_name = new char[buf_size+1];
HDmemset(fattr1_name, 0, buf_size+1);
name_size = fattr1.getName(fattr1_name, buf_size+1);
+ verify_val(name_size, FATTR1_NAME.length(), "Attribute::getName", __LINE__, __FILE__);
verify_val((const char*)fattr1_name, (const char*)short_name, "Attribute::getName", __LINE__, __FILE__);
delete []fattr1_name;
@@ -1590,6 +1592,10 @@ extern "C"
#endif
void cleanup_attr()
{
- //HDremove(FILENAME.c_str());
+ HDremove(FILE_BASIC.c_str());
+ HDremove(FILE_COMPOUND.c_str());
+ HDremove(FILE_SCALAR.c_str());
+ HDremove(FILE_MULTI.c_str());
+ HDremove(FILE_DTYPE.c_str());
}