diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2014-04-06 22:36:15 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2014-04-06 22:36:15 (GMT) |
commit | a08f75b0737c86d51bbc91538e78b1455eb2cae7 (patch) | |
tree | a1e1c4f1cf8ddda6dd0a101af17dc8524ad23050 /c++/test/tdspl.cpp | |
parent | 70daa61a876274a92c0d43ec0116d68e35d0c2ce (diff) | |
download | hdf5-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/tdspl.cpp')
-rw-r--r-- | c++/test/tdspl.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/c++/test/tdspl.cpp b/c++/test/tdspl.cpp index 5944fb1..5c1d953 100644 --- a/c++/test/tdspl.cpp +++ b/c++/test/tdspl.cpp @@ -50,7 +50,6 @@ static void test_transfplist() const char* simple = "(4/2) * ( (2 + 4)/(5 - 2.5))"; /* this equals 4.8 */ /* inverses the utrans transform in init_test to get back original array */ const char* utrans_inv = "(x/3)*4 - 100"; - char *c_to_f_read=NULL, *simple_read=NULL, *utrans_inv_read=NULL; SUBTEST("DSetMemXferPropList::set/getDataTransform()"); try { @@ -75,7 +74,7 @@ static void test_transfplist() // Find out the length of the transform expression, allocate the buffer // for it, then read and verify the expression from the copied plist ssize_t tran_len = dxpl_c_to_f_copy.getDataTransform(NULL); - c_to_f_read = (char *)HDmalloc(tran_len+1); + char *c_to_f_read = (char *)HDmalloc(tran_len+1); HDmemset(c_to_f_read, 0, tran_len+1); dxpl_c_to_f_copy.getDataTransform(c_to_f_read, tran_len+1); verify_val((const char*)c_to_f_read, (const char*)c_to_f, @@ -106,7 +105,7 @@ static void test_transfplist() // Get and verify the expression with: // ssize_t getDataTransform(char* exp, const size_t buf_size) tran_len = dxpl_utrans_inv.getDataTransform(NULL, 0); - utrans_inv_read = (char *)HDmalloc(tran_len+1); + char *utrans_inv_read = (char *)HDmalloc(tran_len+1); HDmemset(utrans_inv_read, 0, tran_len+1); dxpl_utrans_inv.getDataTransform(utrans_inv_read, tran_len+1); verify_val((const char*)utrans_inv_read, (const char*)utrans_inv, |