mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
more testing
This commit is contained in:
parent
7cd344f7b0
commit
bfeb8d4e0b
@ -977,18 +977,12 @@ nc_def_var_extra(int ncid, int varid, int *shuffle, int *deflate,
|
||||
/* Find info for this file and group, and set pointer to each. */
|
||||
if ((retval = nc4_find_nc_grp_h5(ncid, &nc, &grp, &h5)))
|
||||
return retval;
|
||||
assert(nc && grp && h5);
|
||||
|
||||
#ifdef USE_HDF4
|
||||
ishdf4 = h5->hdf4;
|
||||
#endif
|
||||
|
||||
/* Attempting to do any of these things on a netCDF-3 file produces
|
||||
* an error. */
|
||||
if (!h5)
|
||||
return NC_ENOTNC4;
|
||||
|
||||
assert(nc && grp && h5);
|
||||
|
||||
/* Find the var. */
|
||||
if (varid < 0 || varid >= grp->vars.nelems)
|
||||
return NC_ENOTVAR;
|
||||
|
@ -751,7 +751,11 @@ main(int argc, char **argv)
|
||||
/* Define the variable. */
|
||||
if (nc_def_var(ncid, VAR_NAME5, NC_INT, NDIMS5, dimids, &varid)) ERR;
|
||||
|
||||
/* This will fail due to bad chunk size. */
|
||||
/* These will fail due to bad parameters. */
|
||||
if (nc_def_var_chunking(ncid + MILLION, varid, NC_CHUNKED,
|
||||
chunksize) != NC_EBADID) ERR;
|
||||
if (nc_def_var_chunking(ncid + TEST_VAL_42, varid, NC_CHUNKED,
|
||||
chunksize) != NC_EBADID) ERR;
|
||||
if (nc_def_var_chunking(ncid, varid, NC_CHUNKED, bad_chunksize) !=
|
||||
NC_EBADCHUNK) ERR;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user