[svn-r20724] Purpose: Fix a bug in h5diff when enum values are compared that do

not represent a valid enum value.

Description:
The h5diff code compares enum values by converting them to strings and
then comparing them.  When the enum value is out of range and can't be
converted to an enum string representation, the comparison was skipped.

The code now flags differences when one of the two enum values is out
of range (two out of range values are compared in memory).  A test has
been added to the tools test script.

This fixes JIRA HDFFV-7527

Tested on: jam, koala, heiwa (h5committest)
This commit is contained in:
Dana Robinson
2011-05-04 15:07:38 -05:00
parent 2ee1841187
commit fbba9db955
6 changed files with 138 additions and 2 deletions

View File

@@ -76,6 +76,9 @@ COMP_VL_STRS_FILE=h5diff_comp_vl_strs.h5
ATTR_VERBOSE_LEVEL_FILE1=h5diff_attr_v_level1.h5
ATTR_VERBOSE_LEVEL_FILE2=h5diff_attr_v_level2.h5
# test enum types which may have invalid values
ENUM_INVALID_VALUES=h5diff_enum_invalid_values.h5
TESTNAME=h5diff
EXIT_SUCCESS=0
EXIT_FAILURE=1
@@ -413,6 +416,15 @@ TOOLTEST h5diff_27.txt -v $FILE3 $FILE3 t1 t2
TOOLTEST h5diff_28.txt -v $FILE3 $FILE3 l1 l2
# ##############################################################################
# # Enum value tests (may become more comprehensive in the future)
# ##############################################################################
# 3.0
TOOLTEST h5diff_30.txt -v $ENUM_INVALID_VALUES $ENUM_INVALID_VALUES dset1 dset2
# ##############################################################################
# # Dataset datatypes