diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2003-05-30 22:38:46 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2003-05-30 22:38:46 (GMT) |
commit | 614490a83a8f213123f3ad29b37d5b54d4a4a993 (patch) | |
tree | 4d60b868ef66abef4a4d4a480718e2562bbda5fa /tools/h5diff/h5difftst.c | |
parent | e6b24e1995a5c24d3e20aaf9a0d2160a7c51ef08 (diff) | |
download | hdf5-614490a83a8f213123f3ad29b37d5b54d4a4a993.zip hdf5-614490a83a8f213123f3ad29b37d5b54d4a4a993.tar.gz hdf5-614490a83a8f213123f3ad29b37d5b54d4a4a993.tar.bz2 |
[svn-r6928] Purpose:
h5diff support for long_long
Description:
added h5diff support for long_long;
No automatic test was added because
it seems that the printf format of long_long is slightly different in Linux and IRIX(modi4),
because the diff command complained about a difference in the 2 test files for long_long;
visually, it seems that in IRIX an extra space is added after the print (or maybe it is
just me that is seeing extra spaces :=)
this test is test 5.8, commented in testh5diff.sh
Platforms tested:
Windows 2000 (octopus)
Linux 2.4 (rockaway)
SunOS 5.7 (arabica)
IRIX 6.5 (modi4)
Misc. update:
Diffstat (limited to 'tools/h5diff/h5difftst.c')
-rw-r--r-- | tools/h5diff/h5difftst.c | 41 |
1 files changed, 26 insertions, 15 deletions
diff --git a/tools/h5diff/h5difftst.c b/tools/h5diff/h5difftst.c index 968365b..344e356 100644 --- a/tools/h5diff/h5difftst.c +++ b/tools/h5diff/h5difftst.c @@ -14,17 +14,8 @@ #include <stdio.h> #include <stdlib.h> - #include "hdf5.h" - -#if !defined(H5_HAVE_ATTRIBUTE) || defined __cplusplus -# undef __attribute__ -# define __attribute__(X) /*void*/ -# define UNUSED /*void*/ -#else -# define UNUSED __attribute__((unused)) -#endif - +#include "H5private.h" /* diff test*/ @@ -85,6 +76,7 @@ int write_dataset( hid_t loc_id, int rank, hsize_t *dims, const char *dset_name, /* Close */ status = H5Dclose(dataset_id); status = H5Sclose(space_id); + assert(status>=0); return status; @@ -211,6 +203,12 @@ int write_dataset( hid_t loc_id, int rank, hsize_t *dims, const char *dset_name, # 5.6 file6.h5 file6.h5 dset6a dset6b +# 5.7 + file6.h5 file6.h5 dset7a dset7b + +# 5.8 + file6.h5 file6.h5 dset8a dset8b + # ############################################################################## # # Error messages # ############################################################################## @@ -672,8 +670,12 @@ int do_test_5(const char *file1, const char UNUSED *file2) */ char buf7a[3][2] = {{-1,-128},{-1,-1},{-1,-1}}; unsigned char buf7b[3][2] = {{1,128},{1,1},{1,1}}; - unsigned char buf8a[3][2] = {{1,1},{1,1},{1,1}}; - unsigned char buf8b[3][2] = {{1,1},{3,4},{5,6}}; + + /* long_long test */ + long_long buf8a[3][2] = {{1,1},{1,1},{1,1}}; + long_long buf8b[3][2] = {{1,1},{3,4},{5,6}}; + unsigned long_long buf9a[3][2] = {{1,1},{1,1},{1,1}}; + unsigned long_long buf9b[3][2] = {{1,1},{3,4},{5,6}}; /*------------------------------------------------------------------------- @@ -742,12 +744,21 @@ int do_test_5(const char *file1, const char UNUSED *file2) write_dataset(file1_id,2,dims,"dset7b",H5T_NATIVE_UCHAR,buf7b); /*------------------------------------------------------------------------- - * H5T_NATIVE_UCHAR + * H5T_NATIVE_LLONG *------------------------------------------------------------------------- */ - write_dataset(file1_id,2,dims,"dset8a",H5T_NATIVE_UCHAR,buf8a); - write_dataset(file1_id,2,dims,"dset8b",H5T_NATIVE_UCHAR,buf8b); + write_dataset(file1_id,2,dims,"dset8a",H5T_NATIVE_LLONG,buf8a); + write_dataset(file1_id,2,dims,"dset8b",H5T_NATIVE_LLONG,buf8b); + +/*------------------------------------------------------------------------- + * H5T_NATIVE_ULLONG + *------------------------------------------------------------------------- + */ + + write_dataset(file1_id,2,dims,"dset9a",H5T_NATIVE_ULLONG,buf9a); + write_dataset(file1_id,2,dims,"dset9b",H5T_NATIVE_ULLONG,buf9b); + /*------------------------------------------------------------------------- * Close |