diff options
author | Albert Cheng <acheng@hdfgroup.org> | 1998-02-09 19:37:40 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 1998-02-09 19:37:40 (GMT) |
commit | 7e8e3eec42254a6988b2739b621b1412963d590c (patch) | |
tree | cc7d01adda3675d67d35c8cb2edaf7a1dc469f40 /test | |
parent | 35e7a062e26c1a65e571202a6fda0b475e42da00 (diff) | |
download | hdf5-7e8e3eec42254a6988b2739b621b1412963d590c.zip hdf5-7e8e3eec42254a6988b2739b621b1412963d590c.tar.gz hdf5-7e8e3eec42254a6988b2739b621b1412963d590c.tar.bz2 |
[svn-r230] Changes were actually made by Robb. I am commiting them for him
while he is visiting LLNL. I changed the default creation template
offset and length to 4. Will fix the problem later.
Changes since 19980205
----------------------
./src/H5H.c
./src/H5Hprivate.h
./src/H5O.c
./src/H5Ocont.c
./src/H5Odtype.c
./src/H5Oefl.c
./src/H5Olayout.c
./src/H5Oname.c
./src/H5Onull.c
./src/H5Oprivate.h
./src/H5Odspace.c
./src/H5Ostab.c
./src/debug.c
./html/H5.format.html
Added an extra 4-byte field after the heap magic number for
alignment on the DEC alpha. Changed object header message
alignment to 8-bytes.
./src/H5F.c
./src/H5Farray.c
./src/H5Ffamily.c
./src/H5Fistore.c
./src/H5Flow.c
./src/H5Fprivate.h
./src/H5Fsec2.c
./src/H5Fstdio.c
./src/H5Gnode.c
./src/H5O.c
./src/H5Odtype.c
./src/H5P.c
./src/H5Pprivate.h
./src/H5T.c
./src/H5Tconv.c
./src/H5Tpkg.h
./src/H5Tpublic.h
./src/H5V.c
./src/H5detect.c
./test/cmpd_dset.c
./test/dsets.c
./test/dtypes.c
./test/extend.c
./test/hyperslab.c
./test/istore.c
./test/th5p.c
./test/theap.c
Fixed a few irix64 warnings regarding size_t vs. int,
variables set but not used, printf formats
./config/irix64
Added `-woff 1196' to get rid of errors about __vfork() being
implicitly defined in a system header file.
./src/H5B.c
Fixed a stack alignment problem.
Diffstat (limited to 'test')
-rw-r--r-- | test/cmpd_dset.c | 2 | ||||
-rw-r--r-- | test/dsets.c | 3 | ||||
-rw-r--r-- | test/dtypes.c | 9 | ||||
-rw-r--r-- | test/extend.c | 2 | ||||
-rw-r--r-- | test/hyperslab.c | 41 | ||||
-rw-r--r-- | test/istore.c | 5 | ||||
-rw-r--r-- | test/testhdf5.c | 4 | ||||
-rw-r--r-- | test/th5p.c | 2 | ||||
-rw-r--r-- | test/theap.c | 2 |
9 files changed, 38 insertions, 32 deletions
diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c index c8afe38..f146bf2 100644 --- a/test/cmpd_dset.c +++ b/test/cmpd_dset.c @@ -567,5 +567,5 @@ STEP 11: Write an array back to the middle third of the dataset to\n\ H5Dclose (dataset); H5Fclose (file); - exit (0); + return 0; } diff --git a/test/dsets.c b/test/dsets.c index 783ace3..937160f 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -17,6 +17,7 @@ #ifndef HAVE_FUNCTION +#undef __FUNCTION__ #define __FUNCTION__ "" #endif #define AT() printf (" at %s:%d in %s()...\n", \ @@ -398,5 +399,5 @@ main(void) status = H5close (); assert (status>=0); - exit(0); + return 0; } diff --git a/test/dtypes.c b/test/dtypes.c index 707fe29..da0076a 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -15,6 +15,7 @@ #include <H5Tprivate.h> #ifndef HAVE_FUNCTION +#undef __FUNCTION__ #define __FUNCTION__ "" #endif #define AT() printf (" at %s:%d in %s()...\n", \ @@ -44,11 +45,9 @@ typedef struct complex_t { static herr_t test_classes(void) { - H5T_class_t type_class; - printf("%-70s", "Testing H5Tget_class()"); - if (H5T_INTEGER != (type_class = H5Tget_class(H5T_NATIVE_INT))) { + if (H5T_INTEGER != H5Tget_class(H5T_NATIVE_INT)) { puts("*FAILED*"); if (!isatty(1)) { AT(); @@ -56,7 +55,7 @@ test_classes(void) } goto error; } - if (H5T_FLOAT != (type_class = H5Tget_class(H5T_NATIVE_DOUBLE))) { + if (H5T_FLOAT != H5Tget_class(H5T_NATIVE_DOUBLE)) { puts("*FAILED*"); if (!isatty(1)) { AT(); @@ -234,5 +233,5 @@ main(void) exit(1); } printf("All data type tests passed.\n"); - exit(0); + return 0; } diff --git a/test/extend.c b/test/extend.c index b5f2ecc..7f899ee 100644 --- a/test/extend.c +++ b/test/extend.c @@ -124,7 +124,7 @@ main (void) H5Dclose (dataset); H5Fclose (file); - exit (0); + return 0; } diff --git a/test/hyperslab.c b/test/hyperslab.c index 82f78c4..2cc7660 100644 --- a/test/hyperslab.c +++ b/test/hyperslab.c @@ -16,6 +16,7 @@ #include <H5Vprivate.h> #ifndef HAVE_FUNCTION +#undef __FUNCTION__ #define __FUNCTION__ "" #endif #define AT() printf (" at %s:%d in %s()\n",__FILE__,__LINE__,__FUNCTION__); @@ -147,16 +148,17 @@ test_fill(size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_t dk, size_t ddx, size_t ddy, size_t ddz) { - uint8 *dst = NULL; /*destination array */ - size_t hs_size[3]; /*hyperslab size */ - size_t dst_size[3]; /*destination total size */ - size_t dst_offset[3]; /*offset of hyperslab in dest */ - uintn ref_value; /*reference value */ - uintn acc; /*accumulator */ - int i, j, k, dx, dy, dz, u, v, w; /*counters */ - int ndims; /*hyperslab dimensionality */ - char dim[64], s[256]; /*temp string */ - uintn fill_value; /*fill value */ + uint8 *dst = NULL; /*destination array */ + size_t hs_size[3]; /*hyperslab size */ + size_t dst_size[3]; /*destination total size */ + size_t dst_offset[3]; /*offset of hyperslab in dest */ + uintn ref_value; /*reference value */ + uintn acc; /*accumulator */ + int i, j, k, dx, dy, dz; /*counters */ + size_t u, v, w; + int ndims; /*hyperslab dimensionality */ + char dim[64], s[256]; /*temp string */ + uintn fill_value; /*fill value */ /* * Dimensionality. @@ -311,7 +313,8 @@ test_copy(int mode, size_t src_offset[3]; /*offset of hyperslab in source */ uintn ref_value; /*reference value */ uintn acc; /*accumulator */ - int i, j, k, dx, dy, dz, u, v, w; /*counters */ + int i, j, k, dx, dy, dz; /*counters */ + size_t u, v, w; int ndims; /*hyperslab dimensionality */ char dim[64], s[256]; /*temp string */ const char *sub; @@ -761,7 +764,7 @@ test_transpose(size_t nx, size_t ny) src = H5MM_xmalloc(nx * ny * sizeof(*src)); for (i = 0; i < nx; i++) { for (j = 0; j < ny; j++) { - src[i * ny + j] = i * ny + j; + src[i * ny + j] = (intn)(i * ny + j); } } dst = H5MM_xcalloc(nx * ny, sizeof(*dst)); @@ -771,8 +774,8 @@ test_transpose(size_t nx, size_t ny) size[1] = ny; src_stride[0] = 0; src_stride[1] = sizeof(*src); - dst_stride[0] = (1 - nx * ny) * sizeof(*src); - dst_stride[1] = nx * sizeof(*src); + dst_stride[0] = (intn)((1 - nx * ny) * sizeof(*src)); + dst_stride[1] = (intn)(nx * sizeof(*src)); /* Copy and transpose */ if (nx == ny) { @@ -872,7 +875,7 @@ test_sub_super(size_t nx, size_t ny) /* Setup */ size[0] = nx; size[1] = ny; - src_stride[0] = 2 * ny; + src_stride[0] = (intn)(2 * ny); src_stride[1] = 2; dst_stride[0] = 0; dst_stride[1] = 1; @@ -919,9 +922,9 @@ test_sub_super(size_t nx, size_t ny) src_stride[1] = 1; src_stride[2] = 0; src_stride[3] = 0; - dst_stride[0] = 2 * ny; - dst_stride[1] = 2 * sizeof(uint8) - 4 * ny; - dst_stride[2] = 2 * ny - 2 * sizeof(uint8); + dst_stride[0] = (intn)(2 * ny); + dst_stride[1] = (intn)(2 * sizeof(uint8) - 4 * ny); + dst_stride[2] = (intn)(2 * ny - 2 * sizeof(uint8)); dst_stride[3] = sizeof(uint8); /* Copy */ @@ -1161,5 +1164,5 @@ main(int argc, char *argv[]) exit(1); } printf("All hyperslab tests passed.\n"); - exit(0); + return 0; } diff --git a/test/istore.c b/test/istore.c index aef85a4..4aca884 100644 --- a/test/istore.c +++ b/test/istore.c @@ -33,6 +33,7 @@ #define TEST_LARGE 0x0004 #ifndef HAVE_FUNCTION +#undef __FUNCTION__ #define __FUNCTION__ "" #endif #define AT() printf (" at %s:%d in %s()...\n", \ @@ -99,7 +100,7 @@ print_array(uint8 *array, size_t nx, size_t ny, size_t nz) *------------------------------------------------------------------------- */ static int -new_object(H5F_t *f, const char *name, size_t ndims, H5G_entry_t *ent/*out*/) +new_object(H5F_t *f, const char *name, intn ndims, H5G_entry_t *ent/*out*/) { H5O_layout_t layout; intn i; @@ -659,5 +660,5 @@ main(int argc, char *argv[]) exit(1); } printf("All i-store tests passed.\n"); - exit(0); + return 0; } diff --git a/test/testhdf5.c b/test/testhdf5.c index cf713f9..b122606 100644 --- a/test/testhdf5.c +++ b/test/testhdf5.c @@ -192,8 +192,10 @@ main(int argc, char *argv[]) CleanUp = 0; if ((argc > CLLoop) && ((HDstrcmp(argv[CLLoop], "-nocache") == 0) || - (HDstrcmp(argv[CLLoop], "-n") == 0))) + (HDstrcmp(argv[CLLoop], "-n") == 0))) { Cache = 0; + printf ("Cache = %d\n", Cache); + } if ((argc > CLLoop + 1) && ((HDstrcmp(argv[CLLoop], "-exclude") == 0) || (HDstrcmp(argv[CLLoop], "-x") == 0))) { diff --git a/test/th5p.c b/test/th5p.c index e969219..af9100a 100644 --- a/test/th5p.c +++ b/test/th5p.c @@ -63,7 +63,7 @@ test_h5p_basic(void) {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}, /* dataspace dim sizes */ dims2[] = {SPACE2_DIM1, SPACE2_DIM2, SPACE2_DIM3, SPACE2_DIM4}, tdims[4]; /* Dimension array to test with */ - uintn n; /* number of dataspace elements */ + size_t n; /* number of dataspace elements */ herr_t ret; /* Generic return value */ /* Output message about test being performed */ diff --git a/test/theap.c b/test/theap.c index ad0ee75..cad0c3b 100644 --- a/test/theap.c +++ b/test/theap.c @@ -72,7 +72,7 @@ test_heap(void) buf[j] = '\0'; obj[i] = H5H_insert(f, &heap_addr, strlen(buf) + 1, buf); - CHECK_I(obj[i], "H5H_insert"); + assert ((size_t)(-1)!=obj[i]); } /* Flush the cache and invalidate everything */ |