diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2014-03-21 23:23:05 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2014-03-21 23:23:05 (GMT) |
commit | 60df159d33d8793dd5764e2ae032e0e89fc44c9b (patch) | |
tree | 8a83268f8ee902901d982d33b380568a2962f9ab /c++/test/trefer.cpp | |
parent | 2e4302818ab260604ffa26e90dab159cf28079d4 (diff) | |
download | hdf5-60df159d33d8793dd5764e2ae032e0e89fc44c9b.zip hdf5-60df159d33d8793dd5764e2ae032e0e89fc44c9b.tar.gz hdf5-60df159d33d8793dd5764e2ae032e0e89fc44c9b.tar.bz2 |
[svn-r24865] Description:
- Added another overload for char* argument:
ssize_t getComment(const char* name, const size_t buf_size, char* comment)
- Changed default value to 0 for the other two getComment methods
- Added HDmemset to after every char string allocation to clear the buffer
Platforms tested:
Linux/ppc64 (ostrich)
Linux/32 2.6 (jam)
Linux/64 2.6 (platypus)/PGI compilers
Diffstat (limited to 'c++/test/trefer.cpp')
-rw-r--r-- | c++/test/trefer.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/c++/test/trefer.cpp b/c++/test/trefer.cpp index 36c2ee4..e7a28de 100644 --- a/c++/test/trefer.cpp +++ b/c++/test/trefer.cpp @@ -316,11 +316,13 @@ static void test_reference_obj(void) // Dereference group object from the location where 'dataset' is located group.dereference(dataset, &rbuf[2]); - // Get group's comment + // Get group's comment using + // H5std_string getComment(const char* name, <buf_size=0 by default>) H5std_string read_comment1 = group.getComment(".", 10); verify_val(read_comment1.c_str(), write_comment, "Group::getComment",__LINE__,__FILE__); - // Test that getComment handles failures gracefully + // Test that getComment handles failures gracefully, using + // H5std_string getComment(const char* name, <buf_size=0 by default>) try { H5std_string read_comment_tmp = group.getComment(NULL); } |