summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1999-01-21 18:33:39 (GMT)
committerRobb Matzke <matzke@llnl.gov>1999-01-21 18:33:39 (GMT)
commita2b8da49db95737d1962bbf7969cbc86a0b0233d (patch)
treedca97737d4bdf7ee2cdae8040fe5a9b9d6ee0b0f /test
parentbb776bacbf1dd3e80c7ade0f8afc91c2544977b5 (diff)
downloadhdf5-a2b8da49db95737d1962bbf7969cbc86a0b0233d.zip
hdf5-a2b8da49db95737d1962bbf7969cbc86a0b0233d.tar.gz
hdf5-a2b8da49db95737d1962bbf7969cbc86a0b0233d.tar.bz2
[svn-r1032] Changes since 19990118
---------------------- ./tools/h5tools.c Strings are not converted to null-padding before being printed; they are printed with whatever byte values appear in the file. ./tools/h5ls.c Now able to display attribute data type and data. Added a `-f' or `--full' switch which causes the full name of each object to be displayed instead of just the base name. Added a `-r' or `--recursive' switch that recursively prints the contents of groups, avoiding cycles. More bulletproofing for non-printable characters in things like object names, attribute names, and comment strings. We don't want listing a file to send termal escape sequences because it's sometimes possible to execute commands that way. Since h5ls doesn't usually use quotes around object names we must sometimes escape space characters. External files are listed in a table to make the output less confusing. ./tools/h5tools.c ./tools/h5tools.h Changed h5dump() to h5dump_dset() and added h5dump_mem(). Also make h5dump_fixtype() public. ./test/dtypes.c Wrote some data to an attribute to test h5ls attribute printing. ./src/H5ACprivate.h ./src/H5Apublic.h ./src/H5Dprivate.h ./src/H5Dpublic.h ./src/H5Epublic.h ./src/H5Fprivate.h ./src/H5Fpublic.h ./src/H5Gprivate.h ./src/H5HLprivate.h ./src/H5Oprivate.h ./src/H5Ppublic.h ./src/H5RApublic.h ./src/H5Rpublic.h ./src/H5Spublic.h ./src/H5Tpkg.h ./src/H5Tpublic.h ./src/H5Vprivate.h ./src/H5Zpublic.h ./src/H5private.h ./src/H5public.h Reindented function prototypes after `HDF5API' was added. Also rewrapped long lines. ./src/H5Flow.c Added an `#ifdef WIN32' around an unused variable. ./src/H5api_adpt.h Removed extra carriage returns inserted by "broken" operating system. ./src/H5Dprivate.h ./src/H5Oprivate.h ./src/H5Vprivate.h ./src/H5private.h Removed extraneous inclusion of H5api_adpt.h since it's included in H5public.h which is included by everything. ./src/Makefile.in Added H5api_adpt.h to the list of public header files to fix broken `make install'.
Diffstat (limited to 'test')
-rw-r--r--test/.distdep61
-rw-r--r--test/dtypes.c6
2 files changed, 36 insertions, 31 deletions
diff --git a/test/.distdep b/test/.distdep
index 6645e72..9ef14ad 100644
--- a/test/.distdep
+++ b/test/.distdep
@@ -172,36 +172,6 @@ dsets.o: \
../src/H5HGprivate.h \
../src/H5Fprivate.h \
../src/H5Rprivate.h
-dtypes.o: \
- dtypes.c \
- h5test.h \
- ../src/hdf5.h \
- ../src/H5public.h \
- ../src/H5config.h \
- ../src/H5Ipublic.h \
- ../src/H5Apublic.h \
- ../src/H5ACpublic.h \
- ../src/H5Bpublic.h \
- ../src/H5Dpublic.h \
- ../src/H5Epublic.h \
- ../src/H5Fpublic.h \
- ../src/H5Gpublic.h \
- ../src/H5HGpublic.h \
- ../src/H5HLpublic.h \
- ../src/H5MFpublic.h \
- ../src/H5MMpublic.h \
- ../src/H5Opublic.h \
- ../src/H5Ppublic.h \
- ../src/H5Zpublic.h \
- ../src/H5Rpublic.h \
- ../src/H5RApublic.h \
- ../src/H5Spublic.h \
- ../src/H5Tpublic.h \
- ../src/H5private.h \
- ../src/H5Tpkg.h \
- ../src/H5HGprivate.h \
- ../src/H5Fprivate.h \
- ../src/H5Rprivate.h
extend.o: \
extend.c \
h5test.h \
@@ -883,3 +853,34 @@ enum.o: \
../src/H5HGprivate.h \
../src/H5Fprivate.h \
../src/H5Rprivate.h
+dtypes.o: \
+ dtypes.c \
+ h5test.h \
+ ../src/hdf5.h \
+ ../src/H5public.h \
+ ../src/H5config.h \
+ ../src/H5api_adpt.h \
+ ../src/H5Ipublic.h \
+ ../src/H5Apublic.h \
+ ../src/H5ACpublic.h \
+ ../src/H5Bpublic.h \
+ ../src/H5Dpublic.h \
+ ../src/H5Epublic.h \
+ ../src/H5Fpublic.h \
+ ../src/H5Gpublic.h \
+ ../src/H5HGpublic.h \
+ ../src/H5HLpublic.h \
+ ../src/H5MFpublic.h \
+ ../src/H5MMpublic.h \
+ ../src/H5Opublic.h \
+ ../src/H5Ppublic.h \
+ ../src/H5Zpublic.h \
+ ../src/H5Rpublic.h \
+ ../src/H5RApublic.h \
+ ../src/H5Spublic.h \
+ ../src/H5Tpublic.h \
+ ../src/H5private.h \
+ ../src/H5Tpkg.h \
+ ../src/H5HGprivate.h \
+ ../src/H5Fprivate.h \
+ ../src/H5Rprivate.h
diff --git a/test/dtypes.c b/test/dtypes.c
index 108fcb2..22ebe2a 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -549,6 +549,8 @@ test_named (hid_t fapl)
hid_t file=-1, type=-1, space=-1, dset=-1, t2=-1, attr1=-1;
herr_t status;
static hsize_t ds_size[2] = {10, 20};
+ hsize_t i;
+ unsigned attr_data[10][20];
char filename[1024];
TESTING("named data types");
@@ -600,8 +602,10 @@ test_named (hid_t fapl)
}
/* It should be possible to define an attribute for the named type */
- if ((attr1=H5Acreate (type, "attr1", H5T_NATIVE_INT, space,
+ if ((attr1=H5Acreate (type, "attr1", H5T_NATIVE_UCHAR, space,
H5P_DEFAULT))<0) goto error;
+ for (i=0; i<ds_size[0]*ds_size[1]; i++) attr_data[0][i] = i;/*tricky*/
+ if (H5Awrite(attr1, H5T_NATIVE_UINT, attr_data)<0) goto error;
if (H5Aclose (attr1)<0) goto error;
/*