diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2014-04-18 02:39:50 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2014-04-18 02:39:50 (GMT) |
commit | 19125219cdc58a1668ff46e572126c1c3e7c4f0b (patch) | |
tree | 923145058c721f49025f7d3a800e56abbd2b5107 /c++/test/ttypes.cpp | |
parent | 33fd0f8ce250c4c34c1259b21aa9aea716d6fefc (diff) | |
download | hdf5-19125219cdc58a1668ff46e572126c1c3e7c4f0b.zip hdf5-19125219cdc58a1668ff46e572126c1c3e7c4f0b.tar.gz hdf5-19125219cdc58a1668ff46e572126c1c3e7c4f0b.tar.bz2 |
[svn-r25062] Description:
Put back overloaded functions for backward compatibility:
- were replaced by better prototyped versions, such as Attribute::getNam.
- were modified to add const to constant arguments.
Added notes for future removal in documentation.
(Elena approved.) Merged from trunk r25061.
Platforms tested:
Linux/ppc64 (ostrich)
Linux/32 2.6 (jam)
SunOS 5.11 (emu)
Diffstat (limited to 'c++/test/ttypes.cpp')
-rw-r--r-- | c++/test/ttypes.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/c++/test/ttypes.cpp b/c++/test/ttypes.cpp index 690ef2b..5e683c7 100644 --- a/c++/test/ttypes.cpp +++ b/c++/test/ttypes.cpp @@ -411,6 +411,23 @@ static void test_named () IntType itype(PredType::NATIVE_INT); itype.commit(file, "native-int"); + // Test commit passing in const H5File& for prototype with const + try + { + // Create random char type + IntType atype(PredType::NATIVE_UCHAR); + + // Creating group, declared as const + const Group const_grp = file.createGroup("GR as loc"); + + // Commit type passing in const group; compilation would fail if + // no matching prototype + atype.commit(const_grp, "random uchar"); + } // end of try block + catch (Exception E) { + issue_fail_msg("test_named", __LINE__, __FILE__, "Commit at const group"); + } + // Check that it is committed. if (itype.committed() == false) cerr << "IntType::committed() returned false" << endl; |