mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
checking 3D file again after close
This commit is contained in:
parent
6e316f44a6
commit
fe70e818e8
@ -246,6 +246,19 @@ main(int argc, char **argv)
|
|||||||
if (data_in != NC_FILL_INT) ERR;
|
if (data_in != NC_FILL_INT) ERR;
|
||||||
if (nc_close(ncid)) ERR;
|
if (nc_close(ncid)) ERR;
|
||||||
|
|
||||||
|
/* Reopen file and check again. */
|
||||||
|
if (nc_open(FILE_NAME, NC_NOWRITE, &ncid)) ERR;
|
||||||
|
if (nc_inq_dim(ncid, 0, NULL, &len_in)) ERR;
|
||||||
|
if (len_in != 2) ERR;
|
||||||
|
if (nc_inq_dim(ncid, 1, NULL, &len_in)) ERR;
|
||||||
|
if (len_in != 2) ERR;
|
||||||
|
if (nc_inq_dim(ncid, 2, NULL, &len_in)) ERR;
|
||||||
|
if (len_in != 2) ERR;
|
||||||
|
if (nc_get_vara_int(ncid, 0, start, count, &data_in)) ERR;
|
||||||
|
if (data_in != data) ERR;
|
||||||
|
if (nc_get_vara_int(ncid, 1, start, count, &data_in)) ERR;
|
||||||
|
if (data_in != NC_FILL_INT) ERR;
|
||||||
|
if (nc_close(ncid)) ERR;
|
||||||
}
|
}
|
||||||
SUMMARIZE_ERR;
|
SUMMARIZE_ERR;
|
||||||
FINAL_RESULTS;
|
FINAL_RESULTS;
|
||||||
|
Loading…
Reference in New Issue
Block a user