mirror of https://github.com/ecmwf/eccodes.git
Testing: grib_get_double_element
This commit is contained in:
parent
e8e4fefed7
commit
5d288997a2
|
@ -62,8 +62,8 @@ int main(int argc, char** argv)
|
||||||
for (i = 0; i < 100; i++) {
|
for (i = 0; i < 100; i++) {
|
||||||
/* get a particular data value */
|
/* get a particular data value */
|
||||||
GRIB_CHECK(grib_get_double_element(h, "values", i, &element_value), 0);
|
GRIB_CHECK(grib_get_double_element(h, "values", i, &element_value), 0);
|
||||||
|
|
||||||
if (element_value != values[i]) {
|
if (element_value != values[i]) {
|
||||||
|
printf("ERROR: element_value=%g != values[%d]=%g\n", element_value, i, values[i]);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,12 +14,22 @@
|
||||||
|
|
||||||
. ./include.ctest.sh
|
. ./include.ctest.sh
|
||||||
|
|
||||||
infile=${data_dir}/grid_ieee.grib
|
infiles="
|
||||||
|
grid_ieee.grib
|
||||||
|
regular_latlon_surface_constant.grib2
|
||||||
|
gfs.complex.mvmu.grib2
|
||||||
|
constant_field.grib2
|
||||||
|
missing.grib2"
|
||||||
|
|
||||||
# if [ ! -f ${infile} ]
|
if [ $HAVE_JPEG -eq 1 ]; then
|
||||||
# then
|
infiles="jpeg.grib2 "$infiles
|
||||||
# echo no data to test
|
fi
|
||||||
# exit 1
|
|
||||||
# fi
|
|
||||||
|
|
||||||
$EXEC ${test_dir}/grib_double_cmp ${infile}
|
if [ $HAVE_AEC -eq 1 ]; then
|
||||||
|
infiles="ccsds.grib2 "$infiles
|
||||||
|
fi
|
||||||
|
|
||||||
|
for f in $infiles; do
|
||||||
|
infile=$data_dir/$f
|
||||||
|
$EXEC ${test_dir}/grib_double_cmp ${infile}
|
||||||
|
done
|
||||||
|
|
Loading…
Reference in New Issue