mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
fixed HDF4 test
This commit is contained in:
parent
7d2f5a87d0
commit
912e7764a8
@ -79,7 +79,7 @@ int create_hdf_file(int dtype)
|
||||
data = array_data_float64;
|
||||
break;
|
||||
default:
|
||||
ERR;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((sd_id = SDstart(FILENAME, DFACC_CREATE)) == -1) ERR;
|
||||
@ -90,11 +90,11 @@ int create_hdf_file(int dtype)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Create and then read the HDF4 test file. */
|
||||
int test_read_write(int dtype)
|
||||
{
|
||||
if (create_hdf_file(dtype)) ERR;
|
||||
if (create_hdf_file(dtype))
|
||||
return -1;
|
||||
return read_hdf_file(dtype);
|
||||
}
|
||||
|
||||
@ -114,19 +114,19 @@ int main()
|
||||
}
|
||||
SUMMARIZE_ERR;
|
||||
|
||||
/* printf("*** testing for True Negatives. these will return error..."); */
|
||||
/* { */
|
||||
/* /\* True Negatives. *\/ */
|
||||
/* if (test_read_write(DFNT_INT8) != -1) ERR; */
|
||||
/* if (test_read_write(DFNT_UINT8) != -1) ERR; */
|
||||
/* if (test_read_write(DFNT_INT16) != -1) ERR; */
|
||||
/* if (test_read_write(DFNT_UINT16) != -1) ERR; */
|
||||
/* if (test_read_write(DFNT_INT32) != -1) ERR; */
|
||||
/* if (test_read_write(DFNT_UINT32) != -1) ERR; */
|
||||
/* if (test_read_write(DFNT_FLOAT32) != -1) ERR; */
|
||||
/* if (test_read_write(DFNT_FLOAT64) != -1) ERR; */
|
||||
/* } */
|
||||
/* SUMMARIZE_ERR; */
|
||||
printf("*** testing for True Negatives. these will return error...");
|
||||
{
|
||||
/* True Negatives. */
|
||||
if (test_read_write(DFNT_INT8) != -1) ERR;
|
||||
if (test_read_write(DFNT_UINT8) != -1) ERR;
|
||||
if (test_read_write(DFNT_INT16) != -1) ERR;
|
||||
if (test_read_write(DFNT_UINT16) != -1) ERR;
|
||||
if (test_read_write(DFNT_INT32) != -1) ERR;
|
||||
if (test_read_write(DFNT_UINT32) != -1) ERR;
|
||||
if (test_read_write(DFNT_FLOAT32) != -1) ERR;
|
||||
if (test_read_write(DFNT_FLOAT64) != -1) ERR;
|
||||
}
|
||||
SUMMARIZE_ERR;
|
||||
|
||||
FINAL_RESULTS;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user