diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2012-07-09 17:25:16 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2012-07-09 17:25:16 (GMT) |
commit | 1a195c1ee0e9db43eb73495d069b68624df5eae6 (patch) | |
tree | d81e6d5ac8468965ae75a393354f66a4e32e73d3 /tools/h5import/h5importtest.c | |
parent | 9e79829ab8a586914c52d252b662d8fe5824112f (diff) | |
download | hdf5-1a195c1ee0e9db43eb73495d069b68624df5eae6.zip hdf5-1a195c1ee0e9db43eb73495d069b68624df5eae6.tar.gz hdf5-1a195c1ee0e9db43eb73495d069b68624df5eae6.tar.bz2 |
[svn-r22526] ifdef around the text file generation in importtest.
reordered tests so that both scripts are in similar order.
Changed ADD_H5_TEST in CMake file to always delete the created h5 file.
Tested: local linux
Diffstat (limited to 'tools/h5import/h5importtest.c')
-rw-r--r-- | tools/h5import/h5importtest.c | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/tools/h5import/h5importtest.c b/tools/h5import/h5importtest.c index 434cba7..49f977c 100644 --- a/tools/h5import/h5importtest.c +++ b/tools/h5import/h5importtest.c @@ -165,21 +165,38 @@ main(void) #ifndef UNICOS +#ifdef REBUILDTEXTFILES /*------------------------------------------------------------------------- - * TOOLTEST txtin16.txt -c $srcdir/testfiles/txtin16.conf -o txtin16.h5 + * TOOLTEST txtin8.txt -c $srcdir/testfiles/txtin8.conf -o txtin8.h5 *------------------------------------------------------------------------- */ + sp = HDfopen("txtin8.txt", "w"); + for (k = 0; k < npln; k++) + { + for (i = 0; i < nrow; i++) + { + for (j = 0; j < ncol; j++) + (void) fprintf(sp, "%10u", b8i3[k][i][j]); + (void) fprintf(sp, "\n"); + } + } + (void) HDfclose(sp); + + /*------------------------------------------------------------------------- + * TOOLTEST txtin16.txt -c $srcdir/testfiles/txtin16.conf -o txtin16.h5 + *------------------------------------------------------------------------- + */ sp = HDfopen("txtin16.txt", "w"); for (k = 0; k < npln; k++) { - for (i = 0; i < nrow; i++) - { - for (j = 0; j < ncol; j++) - (void) fprintf(sp, "%10u", b16i3[k][i][j]); - (void) fprintf(sp, "\n"); - } + for (i = 0; i < nrow; i++) + { + for (j = 0; j < ncol; j++) + (void) fprintf(sp, "%10u", b16i3[k][i][j]); + (void) fprintf(sp, "\n"); + } } (void) HDfclose(sp); @@ -199,6 +216,7 @@ main(void) } } (void) HDfclose(sp); +#endif /*------------------------------------------------------------------------- * TOOLTEST binin32.bin -c $srcdir/testfiles/binin32.conf -o binin32.h5 |