mirror of https://github.com/ecmwf/eccodes.git
ECC-1741: Test with and without bitmap
This commit is contained in:
parent
bfda78d07c
commit
b367af2fca
|
@ -23,9 +23,14 @@ int main(int argc, char** argv)
|
|||
long Ni = 0, Nj = 0;
|
||||
double* values = NULL;
|
||||
const double missing = 1.0e36;
|
||||
bool use_bitmap = true;
|
||||
bool use_bitmap = false;
|
||||
|
||||
if (argc == 2 && strcmp(argv[1], "-b")==0) {
|
||||
use_bitmap = true;
|
||||
}
|
||||
|
||||
h = codes_grib_handle_new_from_samples(NULL, "GRIB1");
|
||||
assert(h);
|
||||
|
||||
CODES_CHECK(codes_set_double(h, "missingValue", missing), 0);
|
||||
|
||||
|
@ -54,7 +59,7 @@ int main(int argc, char** argv)
|
|||
if (err) {
|
||||
printf("codes_set_double_array failed as expected: err=%s\n", codes_get_error_message(err));
|
||||
} else {
|
||||
fprintf(stderr, "codes_set_double_array should have failed!\n");
|
||||
fprintf(stderr, "Error: codes_set_double_array should have failed!\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,5 +10,14 @@
|
|||
|
||||
. ./include.ctest.sh
|
||||
|
||||
$EXEC ${test_dir}/grib_set_large_message_fail
|
||||
label='grib_set_large_message_fail_test'
|
||||
temp=temp.$label.txt
|
||||
|
||||
$EXEC ${test_dir}/grib_set_large_message_fail > $temp 2>&1
|
||||
grep -q "Failed to set GRIB1 message length" $temp
|
||||
|
||||
$EXEC ${test_dir}/grib_set_large_message_fail -b > $temp 2>&1
|
||||
grep -q "Unable to set double array.*bitmap" $temp
|
||||
|
||||
# Clean up
|
||||
rm -f $temp
|
||||
|
|
Loading…
Reference in New Issue