summaryrefslogtreecommitdiffstats
path: root/hl/test/test_lite.c
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2021-03-12 17:58:10 (GMT)
committerGitHub <noreply@github.com>2021-03-12 17:58:10 (GMT)
commitb42635ad88ef577442b3b600643899b7754fd17c (patch)
tree71c7033d5e24ba26eca8c48762a14118d43bb5d5 /hl/test/test_lite.c
parentbf4399bd25eef9886dab5dcb115e2e439e3a2ac9 (diff)
downloadhdf5-b42635ad88ef577442b3b600643899b7754fd17c.zip
hdf5-b42635ad88ef577442b3b600643899b7754fd17c.tar.gz
hdf5-b42635ad88ef577442b3b600643899b7754fd17c.tar.bz2
Hdf5 merge issue 458 v110 (#465)
* close #195. (#196) * Update HDF5PluginMacros.cmake * Update HDF5PluginMacros.cmake * Modify temporary rpath for testing in java example scripts. (#230) * Fix undefined left shifting of negative numbers (#338) Undefined Bahavior Sanitizer errored here about left shifting negative numbers. * Update license url (#332) * Modify temporary rpath for testing in java example scripts. * Update URL in source file Copyright headers for web copy of COPYING file - src and test directories. * Applied clang-tidy readability-non-const-parameter warning fixes auto… (#429) * Automatically applied clang-tidy readability-avoid-const-params-in-decls fixes Removes useless const declarations. * Fixed most readability-non-const-parameter warnings These changes were made automatically by clang-tidy, but I manually reverted the changes related to the H5Z_func_t signature. * Reformat source with clang v10.0.1. Co-authored-by: Larry Knox <lrknox@hdfgroup.org> * Added C++11 override keyword where appropriate (#433) Added H5_OVERRIDE macro for compatibility with both C++11 and older. * Various clang tidy warning fixes (#448) * Fixed clang-tidy bugprone-reserved-identifier warnings * Fixed clang-tidy bugprone-assert-side-effect warnings * Fixed clang-tidy bugprone-copy-constructor-init warning * Fixed clang-tidy readability-redundant-preprocessor warning For error_test.c the removed code was already dead, because it was in the else of an `#if H5_USE_16_API` block. Based on H5Location.h, I think p_get_ref_obj_type was meant to be in `#ifndef DOXYGEN_SHOULD_SKIP_THIS` and an `#endif` was missing. Similarly, in the header, getObjTypeByIdx is only in H5_NO_DEPRECATED_SYMBOLS, not DOXYGEN_SHOULD_SKIP_THIS. * Fixed clang-tidy readability-redundant-string-init warnings * Fixed some clang-tidy performance-type-promotion-in-math-fn warnings * Fixed clang-tidy performance-unnecessary-value-param warnings * Reformat source with clang v10.0.1. Co-authored-by: Larry Knox <lrknox@hdfgroup.org> * Removed checks/workarounds for pre-C++89 compatibility (#449) After 30+ years, just assume that the following exist: - extension-less includes - namespaces - std:: - static_cast - bool * Fixed all clang-tidy bugprone-suspicious-string-compare warnings (#451) * Fixed all clang-tidy bugprone-suspicious-string-compare warnings This change was generated entirely by clang-tidy itself. * Reformat code with clang v10.0.1. Co-authored-by: Larry Knox <lrknox@hdfgroup.org> * Fix clang-tidy suspicious string compare in H5A.c missed in merge. Co-authored-by: H. Joe Lee <hyoklee@hdfgroup.org> Co-authored-by: Sean McBride <sean@rogue-research.com>
Diffstat (limited to 'hl/test/test_lite.c')
-rw-r--r--hl/test/test_lite.c34
1 files changed, 18 insertions, 16 deletions
diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c
index 52cda54..cae91ff 100644
--- a/hl/test/test_lite.c
+++ b/hl/test/test_lite.c
@@ -1054,7 +1054,7 @@ test_integers(void)
HDfree(dt_str);
goto out;
}
- if (HDstrcmp(dt_str, "H5T_STD_I8BE")) {
+ if (HDstrcmp(dt_str, "H5T_STD_I8BE") != 0) {
HDfree(dt_str);
goto out;
}
@@ -1112,7 +1112,7 @@ test_fps(void)
HDfree(dt_str);
goto out;
}
- if (HDstrcmp(dt_str, "H5T_IEEE_F32BE")) {
+ if (HDstrcmp(dt_str, "H5T_IEEE_F32BE") != 0) {
HDfree(dt_str);
goto out;
}
@@ -1184,7 +1184,7 @@ test_strings(void)
goto out;
}
if (HDstrcmp(dt_str, "H5T_STRING {\n STRSIZE 13;\n STRPAD H5T_STR_NULLTERM;\n CSET "
- "H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }")) {
+ "H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }") != 0) {
HDprintf("dt=\n%s\n", dt_str);
HDfree(dt_str);
goto out;
@@ -1219,7 +1219,7 @@ test_strings(void)
goto out;
}
if (HDstrcmp(dt_str, "H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n "
- "CSET H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }")) {
+ "CSET H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }") != 0) {
HDprintf("dt=\n%s\n", dt_str);
HDfree(dt_str);
goto out;
@@ -1238,7 +1238,7 @@ test_strings(void)
if (HDstrncmp(dt_str,
"H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n CSET "
"H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }",
- str_len - 1)) {
+ str_len - 1) != 0) {
HDprintf("dt=\n%s\n", dt_str);
HDfree(dt_str);
goto out;
@@ -1261,7 +1261,7 @@ test_strings(void)
if (HDstrncmp(dt_str,
"H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n CSET "
"H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }",
- str_len)) {
+ str_len) != 0) {
HDprintf("dt=\n%s\n", dt_str);
HDfree(dt_str);
goto out;
@@ -1322,7 +1322,8 @@ test_opaques(void)
}
if (HDstrcmp(
dt_str,
- "H5T_OPAQUE {\n OPQ_SIZE 19;\n OPQ_TAG \"This is a tag for opaque type\";\n }")) {
+ "H5T_OPAQUE {\n OPQ_SIZE 19;\n OPQ_TAG \"This is a tag for opaque type\";\n }") !=
+ 0) {
HDprintf("dt=\n%s\n", dt_str);
HDfree(dt_str);
goto out;
@@ -1376,7 +1377,7 @@ test_enums(void)
if (H5Tenum_nameof(dtype, &value1, name1, size) < 0)
goto out;
- if (HDstrcmp(name1, "BLUE"))
+ if (HDstrcmp(name1, "BLUE") != 0)
goto out;
if (H5Tenum_valueof(dtype, name2, &value2) < 0)
@@ -1399,8 +1400,9 @@ test_enums(void)
HDfree(dt_str);
goto out;
}
- if (HDstrcmp(dt_str, "H5T_ENUM {\n H5T_STD_I32LE;\n \"RED\" 5;\n \"GREEN\" "
- " 6;\n \"BLUE\" 7;\n \"WHITE\" 8;\n }")) {
+ if (HDstrcmp(dt_str,
+ "H5T_ENUM {\n H5T_STD_I32LE;\n \"RED\" 5;\n \"GREEN\" "
+ " 6;\n \"BLUE\" 7;\n \"WHITE\" 8;\n }") != 0) {
HDprintf("dt=\n%s\n", dt_str);
HDfree(dt_str);
@@ -1462,7 +1464,7 @@ test_variables(void)
HDfree(dt_str);
goto out;
}
- if (HDstrcmp(dt_str, "H5T_VLEN {\n H5T_VLEN {\n H5T_STD_I32BE\n }\n }")) {
+ if (HDstrcmp(dt_str, "H5T_VLEN {\n H5T_VLEN {\n H5T_STD_I32BE\n }\n }") != 0) {
HDprintf("dt=\n%s\n", dt_str);
HDfree(dt_str);
goto out;
@@ -1526,7 +1528,7 @@ test_arrays(void)
}
if (HDstrcmp(dt_str, "H5T_ARRAY {\n [5][7][13] H5T_ARRAY {\n [17][19] H5T_COMPOUND {\n "
" H5T_STD_I8BE \"arr_compound_1\" : 0;\n H5T_STD_I32BE "
- "\"arr_compound_2\" : 1;\n }\n }\n }")) {
+ "\"arr_compound_2\" : 1;\n }\n }\n }") != 0) {
HDprintf("dt=\n%s\n", dt_str);
HDfree(dt_str);
goto out;
@@ -1586,7 +1588,7 @@ test_compounds(void)
goto out;
}
if (HDstrcmp(dt_str, "H5T_COMPOUND {\n H5T_STD_I16BE \"one_field\" : 2;\n H5T_STD_U8LE "
- "\"two_field\" : 6;\n }")) {
+ "\"two_field\" : 6;\n }") != 0) {
HDprintf("dt=\n%s\n", dt_str);
HDfree(dt_str);
goto out;
@@ -1605,7 +1607,7 @@ test_compounds(void)
if ((memb_name = H5Tget_member_name(dtype, 1)) == NULL)
goto out;
- if (HDstrcmp(memb_name, "i16_field")) {
+ if (HDstrcmp(memb_name, "i16_field") != 0) {
H5free_memory(memb_name);
goto out;
}
@@ -1683,7 +1685,7 @@ test_compound_bug(void)
if ((memb_name = H5Tget_member_name(dtype, 2)) == NULL)
goto out;
- if (HDstrcmp(memb_name, "sub")) {
+ if (HDstrcmp(memb_name, "sub") != 0) {
H5free_memory(memb_name);
goto out;
}
@@ -1720,7 +1722,7 @@ test_compound_bug(void)
if ((memb_name = H5Tget_member_name(dtype, 1)) == NULL)
goto out;
if (HDstrcmp(memb_name, "desc____________________________________________________________________________"
- "_____________")) {
+ "_____________") != 0) {
H5free_memory(memb_name);
goto out;
}