summaryrefslogtreecommitdiffstats
path: root/test/dtypes.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/dtypes.c')
-rw-r--r--test/dtypes.c6
1 files changed, 5 insertions, 1 deletions
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;
/*