mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-18 15:55:12 +08:00
found HDF5 dimscale bug
This commit is contained in:
parent
25ec2b9a54
commit
d1a6aa38d8
@ -16,28 +16,6 @@ int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
printf("\n*** Testing netcdf-4 variable syncing.\n");
|
||||
printf("**** testing that sync works in netCDF-4, with test contributed by Jeff W....");
|
||||
{
|
||||
int ncid, var1_id, var2_id, var3_id, dimid;
|
||||
|
||||
nc_set_log_level(3);
|
||||
|
||||
/* Create a file with one dim and two variables. */
|
||||
if (nc_create(FILE_NAME, NC_NETCDF4, &ncid)) ERR;
|
||||
if (nc_def_dim(ncid, DIM_NAME, 1, &dimid)) ERR;
|
||||
if (nc_def_var(ncid, VAR1_NAME, NC_FLOAT, 1, &dimid, &var1_id)) ERR;
|
||||
if (nc_def_var(ncid, VAR2_NAME, NC_FLOAT, 1,&dimid, &var2_id)) ERR;
|
||||
|
||||
/* Sync the file and add a coordinate variable. */
|
||||
if (nc_sync(ncid)) ERR;
|
||||
if (nc_def_var(ncid, DIM_NAME, NC_FLOAT, 1, &dimid, &var3_id)) ERR;
|
||||
|
||||
/* Close the file. */
|
||||
if (nc_close(ncid)) ERR;
|
||||
nc_set_log_level(0);
|
||||
}
|
||||
SUMMARIZE_ERR;
|
||||
#ifdef EXTRA_TESTS
|
||||
printf("**** testing that sync works in netCDF-4...");
|
||||
{
|
||||
int ncid, var1_id, var2_id, var3_id, dimid;
|
||||
@ -67,6 +45,28 @@ main(int argc, char **argv)
|
||||
if (nc_close(ncid)) ERR;
|
||||
}
|
||||
SUMMARIZE_ERR;
|
||||
#ifdef EXTRA_TESTS
|
||||
printf("**** testing that sync works in netCDF-4, with test contributed by Jeff W....");
|
||||
{
|
||||
int ncid, var1_id, var2_id, var3_id, dimid;
|
||||
|
||||
nc_set_log_level(3);
|
||||
|
||||
/* Create a file with one dim and two variables. */
|
||||
if (nc_create(FILE_NAME, NC_NETCDF4, &ncid)) ERR;
|
||||
if (nc_def_dim(ncid, DIM_NAME, 1, &dimid)) ERR;
|
||||
if (nc_def_var(ncid, VAR1_NAME, NC_FLOAT, 1, &dimid, &var1_id)) ERR;
|
||||
if (nc_def_var(ncid, VAR2_NAME, NC_FLOAT, 1,&dimid, &var2_id)) ERR;
|
||||
|
||||
/* Sync the file and add a coordinate variable. */
|
||||
if (nc_sync(ncid)) ERR;
|
||||
if (nc_def_var(ncid, DIM_NAME, NC_FLOAT, 1, &dimid, &var3_id)) ERR;
|
||||
|
||||
/* Close the file. */
|
||||
if (nc_close(ncid)) ERR;
|
||||
nc_set_log_level(0);
|
||||
}
|
||||
SUMMARIZE_ERR;
|
||||
printf("**** testing that sync works in netCDF-4, with test contributed by Jeff W....");
|
||||
{
|
||||
int ncid, var1_id, var2_id, var3_id, dimid;
|
||||
|
Loading…
Reference in New Issue
Block a user