summaryrefslogtreecommitdiffstats
path: root/test/set_extent.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-05-10 15:06:49 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-05-10 15:06:49 (GMT)
commit10a6685aaaf56fd292ffe575106859b012421900 (patch)
treed320eaa88d197a565bf2f0702f94a9d9dcd002f7 /test/set_extent.c
parent10114bd211127d2d64ba210871938f287bd4c125 (diff)
downloadhdf5-10a6685aaaf56fd292ffe575106859b012421900.zip
hdf5-10a6685aaaf56fd292ffe575106859b012421900.tar.gz
hdf5-10a6685aaaf56fd292ffe575106859b012421900.tar.bz2
[svn-r13741] Description:
Minor formatting & warning reduction code cleanups Tested on: Mac OS X/32 10.4.9 (amazon) Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2)
Diffstat (limited to 'test/set_extent.c')
-rw-r--r--test/set_extent.c35
1 files changed, 19 insertions, 16 deletions
diff --git a/test/set_extent.c b/test/set_extent.c
index 319811d..c4c3ed0 100644
--- a/test/set_extent.c
+++ b/test/set_extent.c
@@ -123,27 +123,28 @@ int main( void )
for( i = 0; i < (int)dims_out[0]; i++ )
for( j = 0; j < (int)dims_out[1]; j++ )
if ( buf1[i][j] != data[i][j] ) {
- printf("buf1[%d][%d]=%d\n",i,j,buf1[i][j]);
- printf("data[%d][%d]=%d\n",i,j,data[i][j]);
+ printf("buf1[%d][%d] = %d\n", i, j, buf1[i][j]);
+ printf("data[%d][%d] = %d\n", i, j, data[i][j]);
TEST_ERROR;
} /* end if */
/*-------------------------------------------------------------------------
- * Set new dimensions for the array; expand it again
+ * Set new dimensions for the array; expand it back to original size
*-------------------------------------------------------------------------
*/
/* Set new dimensions for the array. */
- if (H5Dset_extent( dataset_id , dims )<0) TEST_ERROR;
+ if(H5Dset_extent(dataset_id, dims) < 0) TEST_ERROR;
/* Get the space. */
- if ((space_id = H5Dget_space( dataset_id ))<0) TEST_ERROR;
+ if((space_id = H5Dget_space(dataset_id)) < 0) TEST_ERROR;
/* Get dimensions. */
- if (H5Sget_simple_extent_dims( space_id, dims_out, NULL )<0) TEST_ERROR;
+ if(H5Sget_simple_extent_dims(space_id, dims_out, NULL) < 0) TEST_ERROR;
- if ( dims_out[0] != dims[0] ) TEST_ERROR;
+ if(dims_out[0] != dims[0]) TEST_ERROR;
+ if(dims_out[1] != dims[1]) TEST_ERROR;
/*-------------------------------------------------------------------------
@@ -152,19 +153,21 @@ int main( void )
*/
/* Read the new dataset. */
- if (H5Dread( dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2 )<0) TEST_ERROR;
+ if(H5Dread(dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2) < 0) TEST_ERROR;
/* Compare the read array with the original array */
- for( i = 0; i < (int)dims_out[0]; i++ ) {
- for( j = 0; j < (int)dims_out[1]; j++ ) {
- if ( i >= 70 || j >= 70 ) {
- if ( buf2[i][j] != fillvalue ) TEST_ERROR;
- }
+ for(i = 0; i < (int)dims_out[0]; i++ )
+ for(j = 0; j < (int)dims_out[1]; j++ )
+ if(i >= 70 || j >= 70) {
+ if(buf2[i][j] != fillvalue) {
+ printf("buf1[%d][%d] = %d\n", i, j, buf1[i][j]);
+ printf("fillvalue = %d\n", fillvalue);
+ TEST_ERROR;
+ } /* end if */
+ } /* end if */
else {
- if ( buf2[i][j] != data[i][j] ) TEST_ERROR;
+ if(buf2[i][j] != data[i][j]) TEST_ERROR;
}
- }
- }
/*-------------------------------------------------------------------------