summaryrefslogtreecommitdiffstats
path: root/c++/test/ttypes.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2014-04-17 23:25:01 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2014-04-17 23:25:01 (GMT)
commita75e8dd654268ba1dd35abf3a78da2f115802029 (patch)
tree55ce2f23d860187f021d11c3611fa43c314eff6b /c++/test/ttypes.cpp
parentca6e13d3dff9c188d80cb84876cf3ccfeb6b6203 (diff)
downloadhdf5-a75e8dd654268ba1dd35abf3a78da2f115802029.zip
hdf5-a75e8dd654268ba1dd35abf3a78da2f115802029.tar.gz
hdf5-a75e8dd654268ba1dd35abf3a78da2f115802029.tar.bz2
[svn-r25061] Description:
Put back overloaded functions for backward compatibility: - were replaced by better prototyped versions, such as Attribute::getName. - were modified to add const to constant arguments. Added notes for future removal in documentation. 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.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/c++/test/ttypes.cpp b/c++/test/ttypes.cpp
index 933181c..e9e1427 100644
--- a/c++/test/ttypes.cpp
+++ b/c++/test/ttypes.cpp
@@ -414,6 +414,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;