From adc912850bf6de6d4e5db0d8b6cb2cf389cf721d Mon Sep 17 00:00:00 2001 From: shahramn Date: Thu, 22 Feb 2024 19:33:02 +0000 Subject: [PATCH] Testing: Variables like constants and transients --- src/grib_accessor_class_variable.cc | 6 ++++++ tests/codes_compare_keys.sh | 4 ++++ tests/codes_get_string.sh | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/grib_accessor_class_variable.cc b/src/grib_accessor_class_variable.cc index 9d12e04cf..6a39d34df 100644 --- a/src/grib_accessor_class_variable.cc +++ b/src/grib_accessor_class_variable.cc @@ -126,6 +126,12 @@ grib_accessor_class* grib_accessor_class_variable = &_grib_accessor_class_variab /* END_CLASS_IMP */ +// +// This accessor is used for: +// constant +// transient +// + #define MAX_VARIABLE_STRING_LENGTH 255 static void init(grib_accessor* a, const long length, grib_arguments* args) diff --git a/tests/codes_compare_keys.sh b/tests/codes_compare_keys.sh index 9a2a39aef..1a678ede8 100755 --- a/tests/codes_compare_keys.sh +++ b/tests/codes_compare_keys.sh @@ -68,6 +68,9 @@ diff $tempRef $tempLog sample_spectral=$ECCODES_SAMPLES_PATH/sh_ml_grib2.tmpl ${test_dir}/codes_compare_keys $sample_spectral $sample_spectral enorm,avg +# Do some constant and transient keys +${test_dir}/codes_compare_keys $sample_spectral $sample_spectral marsDir,truncateLaplacian + # Local definitions # ---------------------- @@ -82,6 +85,7 @@ status=$? set -e [ $status -ne 0 ] grep -q "2 differences" $tempLog + rm -f $tempGribA $tempGribB diff --git a/tests/codes_get_string.sh b/tests/codes_get_string.sh index a42ef9f97..188c81a3e 100755 --- a/tests/codes_get_string.sh +++ b/tests/codes_get_string.sh @@ -22,7 +22,7 @@ $EXEC ${test_dir}/codes_get_string GRIB $tempGrib dayOfTheYearDate # 2> $tempTex input=$data_dir/reduced_latlon_surface.grib2 -keys="identifier projString bitmap class year gridDefinitionDescription +keys="hundred identifier projString bitmap class year gridDefinitionDescription time validityTime packingType md5Headers parameterUnits" for k in $keys; do $EXEC ${test_dir}/codes_get_string GRIB $input $k 2> $tempText