summaryrefslogtreecommitdiffstats
path: root/tools/h5diff/h5diffgentest.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2012-08-21 19:45:36 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2012-08-21 19:45:36 (GMT)
commit18d574106c5eaeb7addd6fa6b28d5197cedce992 (patch)
tree71b66031947de38674867f1826f60a8c872eb1d8 /tools/h5diff/h5diffgentest.c
parent60d3b3091764c2ec9bede45aeacb6b2da1fa22d8 (diff)
parente53af0ed745a7bec1795681c473ba54025814fd5 (diff)
downloadhdf5-18d574106c5eaeb7addd6fa6b28d5197cedce992.zip
hdf5-18d574106c5eaeb7addd6fa6b28d5197cedce992.tar.gz
hdf5-18d574106c5eaeb7addd6fa6b28d5197cedce992.tar.bz2
[svn-r22704] merge from trunk up to 22703.
Diffstat (limited to 'tools/h5diff/h5diffgentest.c')
-rw-r--r--tools/h5diff/h5diffgentest.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c
index c370f79..7c69154 100644
--- a/tools/h5diff/h5diffgentest.c
+++ b/tools/h5diff/h5diffgentest.c
@@ -759,6 +759,7 @@ int test_datatypes(const char *fname)
{
hid_t fid1;
+ hid_t dset;
hsize_t dims[2]={3,2};
herr_t status;
char buf1a[3][2] = {{1,1},{1,1},{1,1}};
@@ -790,6 +791,9 @@ int test_datatypes(const char *fname)
unsigned int buf10a[3][2] = {{UIMAX,1},{1,1},{1,1}};
unsigned int buf10b[3][2] = {{UIMAX-1,1},{3,4},{5,6}};
+ unsigned short buf11a[3][2] = {{204,205},{2,3},{1,1}};
+ unsigned int buf11b[3][2] = {{204,205},{2,3},{1,1}};
+
/*-------------------------------------------------------------------------
* Create a file
@@ -880,6 +884,19 @@ int test_datatypes(const char *fname)
write_dset(fid1,2,dims,"dset10a",H5T_NATIVE_UINT,buf10a);
write_dset(fid1,2,dims,"dset10b",H5T_NATIVE_UINT,buf10b);
+ /*-------------------------------------------------------------------------
+ * Same type class, different size
+ *-------------------------------------------------------------------------
+ */
+ write_dset(fid1,2,dims,"dset11a",H5T_STD_U16LE,buf11a);
+ dset=H5Dopen2 (fid1, "dset11a", H5P_DEFAULT);
+ write_attr(dset,2,dims,"attr",H5T_STD_U16LE,buf11a);
+ H5Dclose (dset);
+
+ write_dset(fid1,2,dims,"dset11b",H5T_STD_U32LE,buf11b);
+ dset=H5Dopen2 (fid1, "dset11b", H5P_DEFAULT);
+ write_attr(dset,2,dims,"attr",H5T_STD_U32LE,buf11b);
+ H5Dclose (dset);
/*-------------------------------------------------------------------------
* Close