summaryrefslogtreecommitdiffstats
path: root/c++/test
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2018-07-18 15:36:05 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2018-07-18 15:36:05 (GMT)
commitdd0a040ec807912b80a9f1779fbf46c65d01cd57 (patch)
tree4d28b4e5fbb6cd0391b8f13d41f71210b476af2f /c++/test
parent9a306f8311f28031d51827a1f0fcb7927ab181f1 (diff)
downloadhdf5-dd0a040ec807912b80a9f1779fbf46c65d01cd57.zip
hdf5-dd0a040ec807912b80a9f1779fbf46c65d01cd57.tar.gz
hdf5-dd0a040ec807912b80a9f1779fbf46c65d01cd57.tar.bz2
Fixed EED-319
Description: - Fixed doc issue Added an html version for the C++ function mapping table and removed the single web page version. Updated cpp_doc_config to use the html file. - Added a couple more minor tests
Diffstat (limited to 'c++/test')
-rw-r--r--c++/test/ttypes.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/c++/test/ttypes.cpp b/c++/test/ttypes.cpp
index b30d9e7..6d585bd 100644
--- a/c++/test/ttypes.cpp
+++ b/c++/test/ttypes.cpp
@@ -1070,7 +1070,7 @@ static void test_operators()
// Test with EnumType
//
- // Create a enumerate datatype
+ // Create an enumerate datatype
EnumType enumtyp(sizeof(short));
enumtyp.insert("RED", (enum_val=0,&enum_val));
@@ -1085,17 +1085,26 @@ static void test_operators()
// Test with compound datatype's member
//
- // Create a variable-length string type
+ // Create random atomic datatypes
IntType inttyp(PredType::NATIVE_INT);
FloatType flttyp(PredType::NATIVE_FLOAT);
- // Get NATIVE_INT member from the compound datatype above
+ // Get the NATIVE_INT member from the compound datatype above
IntType member_inttyp = cmptyp.getMemberIntType(0);
+ // Test various combinations
verify_val(inttyp == member_inttyp, true, "DataType::operator==", __LINE__, __FILE__);
verify_val(flttyp == member_inttyp, false, "DataType::operator==", __LINE__, __FILE__);
verify_val(flttyp != member_inttyp, true, "DataType::operator==", __LINE__, __FILE__);
+ // Get the NATIVE_LONG member from the compound datatype above
+ IntType member_longtyp = cmptyp.getMemberIntType(2);
+
+ // Test various combinations
+ verify_val(inttyp == member_longtyp, false, "DataType::operator==", __LINE__, __FILE__);
+ verify_val(flttyp == member_longtyp, false, "DataType::operator==", __LINE__, __FILE__);
+ verify_val(flttyp != member_longtyp, true, "DataType::operator==", __LINE__, __FILE__);
+
PASSED();
}
catch (Exception& E)