diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2022-04-07 14:23:35 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-07 14:23:35 (GMT) |
commit | 13d852d89ede307314adbfaa036fe670dfa75554 (patch) | |
tree | f3e66489a150de1fd493365cf5cf535963679e5d /c++/test/ttypes.cpp | |
parent | 541bc15452f71f3eae7471fdecbe7994a7f138e2 (diff) | |
download | hdf5-13d852d89ede307314adbfaa036fe670dfa75554.zip hdf5-13d852d89ede307314adbfaa036fe670dfa75554.tar.gz hdf5-13d852d89ede307314adbfaa036fe670dfa75554.tar.bz2 |
1.12: Brings C++ wrappers in line with develop, minus C++11 bits (#1604)
Diffstat (limited to 'c++/test/ttypes.cpp')
-rw-r--r-- | c++/test/ttypes.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/c++/test/ttypes.cpp b/c++/test/ttypes.cpp index 50f9282..8afb4bb 100644 --- a/c++/test/ttypes.cpp +++ b/c++/test/ttypes.cpp @@ -28,7 +28,7 @@ using namespace H5; #include "h5cpputil.h" // C++ utilility header file /* - * Offset from alinged memory returned by malloc(). This can be used to test + * Offset from aligned memory returned by malloc(). This can be used to test * that type conversions handle non-aligned buffers correctly. */ #define ALIGNMENT 1 @@ -110,8 +110,8 @@ test_classes() // PredType::NATIVE_DOUBLE should be in H5T_FLOAT class tcls = PredType::NATIVE_DOUBLE.getClass(); if (H5T_FLOAT != tcls) { - verify_val(tcls, H5T_FLOAT, "test_class: invalid type class for NATIVE_DOUBLE -", __LINE__, - __FILE__); + verify_val(static_cast<long>(tcls), static_cast<long>(H5T_FLOAT), + "test_class: invalid type class for NATIVE_DOUBLE -", __LINE__, __FILE__); } PASSED(); } // end of try block @@ -699,7 +699,7 @@ test_named() } // Check that it is committed. - if (itype.committed() == false) + if (!itype.committed()) cerr << "IntType::committed() returned false" << endl; // We should not be able to modify a type after it has been committed. @@ -804,8 +804,7 @@ test_named() issue_fail_msg("test_named", __LINE__, __FILE__, E.getCDetailMsg()); } - if (ds_type) - delete ds_type; + delete ds_type; } // test_named /*------------------------------------------------------------------------- @@ -990,7 +989,8 @@ test_encode_decode() // Create an IntType instance from the decoded pointer and verify it IntType * decoded_int_ptr(static_cast<IntType *>(inttyp.decode())); H5T_sign_t int_sign = decoded_int_ptr->getSign(); - verify_val(int_sign, H5T_SGN_NONE, "DataType::decode", __LINE__, __FILE__); + verify_val(static_cast<long>(int_sign), static_cast<long>(H5T_SGN_NONE), "DataType::decode", __LINE__, + __FILE__); verify_val(inttyp == *decoded_int_ptr, true, "DataType::decode", __LINE__, __FILE__); delete decoded_int_ptr; |