diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2003-04-14 11:18:55 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2003-04-14 11:18:55 (GMT) |
commit | e270be267beb1eedf046f46fafbc24f747748095 (patch) | |
tree | 4ebe8faa71a0692bd3a3f1ecf171a41a57e6ece2 | |
parent | 7e0748de229a4636f75809ed88ca93e7dababf81 (diff) | |
download | hdf5-e270be267beb1eedf046f46fafbc24f747748095.zip hdf5-e270be267beb1eedf046f46fafbc24f747748095.tar.gz hdf5-e270be267beb1eedf046f46fafbc24f747748095.tar.bz2 |
[svn-r6662] Purpose:
Code cleanup
Description:
Switched some system/library calls to use wrappers.
Platforms tested:
FreeBSD 4.8 (sleipnir) w/C++
Linux 2.4 (burrwhite) w/FORTRAN
Solaris 2.7 (arabica) w/FORTRAN
IRIX64 6.5 (modi4) w/parallel & FORTRAN
(h5committest not run due to my ongoing difficulties with C++ on burrwhite).
-rw-r--r-- | test/dsets.c | 10 | ||||
-rw-r--r-- | test/th5s.c | 4 |
2 files changed, 9 insertions, 5 deletions
diff --git a/test/dsets.c b/test/dsets.c index 2fd5eb7..c18c24a 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -19,6 +19,7 @@ * Purpose: Tests the dataset interface (H5D) */ +#include <time.h> #include "h5test.h" /* @@ -1091,7 +1092,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32, for (i=0; i<size[0]; i++) { for (j=0; j<size[1]/2; j++) { - points[i][j] = rand (); + points[i][j] = HDrandom (); } } if (H5Dwrite (dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, points)<0) @@ -1197,7 +1198,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32, for (i=0; i<hs_size[0]; i++) { for (j=0; j<hs_size[1]; j++) { - points[hs_offset[0]+i][hs_offset[1]+j] = rand (); + points[hs_offset[0]+i][hs_offset[1]+j] = HDrandom(); } } if (H5Sselect_hyperslab(sid, H5S_SELECT_SET, hs_offset, NULL, hs_size, @@ -1823,7 +1824,7 @@ test_onebyte_shuffle(hid_t file) for (i= 0;i< 10; i++) for (j = 0; j < 20; j++) - orig_data[i][j] = rand(); + orig_data[i][j] = HDrandom(); PASSED(); #else @@ -2650,6 +2651,9 @@ main(void) } #endif + /* Set the random # seed */ + HDsrandom((unsigned long)time(NULL)); + h5_fixname(FILENAME[0], fapl, filename, sizeof filename); if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) { goto error; diff --git a/test/th5s.c b/test/th5s.c index 0239cc4..e8185db 100644 --- a/test/th5s.c +++ b/test/th5s.c @@ -154,12 +154,12 @@ test_h5s_basic(void) * higher dimensionality than what the library can handle. * * If this test fails and the H5S_MAX_RANK variable has changed, follow - * the instructions in space_overflow.c for regenating the th5s.h5 file. + * the instructions in space_overflow.c for regenerating the th5s.h5 file. */ { char testfile[512]=""; char *srcdir = HDgetenv("srcdir"); - if (srcdir && ((HDstrlen(srcdir) + strlen(TESTFILE) + 1) < sizeof(testfile))){ + if (srcdir && ((HDstrlen(srcdir) + HDstrlen(TESTFILE) + 1) < sizeof(testfile))){ HDstrcpy(testfile, srcdir); HDstrcat(testfile, "/"); } |