summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1998-04-28 16:37:17 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1998-04-28 16:37:17 (GMT)
commitdce73e919fc77959ed7653b0ab330a6952494547 (patch)
tree032dbc23b510e29407b70b3dc5636d3de547853b /test
parent66071d5078ad9841c8fbb430881ae2c6e059886e (diff)
downloadhdf5-dce73e919fc77959ed7653b0ab330a6952494547.zip
hdf5-dce73e919fc77959ed7653b0ab330a6952494547.tar.gz
hdf5-dce73e919fc77959ed7653b0ab330a6952494547.tar.bz2
[svn-r378] Merged Robb's and my memory leak fixes into one set of common fixes.
Diffstat (limited to 'test')
-rw-r--r--test/tattr.c8
-rw-r--r--test/tstab.c6
2 files changed, 12 insertions, 2 deletions
diff --git a/test/tattr.c b/test/tattr.c
index 400717d..4efb94e 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -117,6 +117,10 @@ test_attr_basic_write(void)
sid2 = H5Screate_simple(ATTR1_RANK, dims2, NULL);
CHECK(sid2, FAIL, "H5Screate_simple");
+ /* Try to create an attribute on the file (should fail) */
+ ret=H5Acreate(fid1,ATTR1_NAME,H5T_NATIVE_INT32,sid2,H5P_DEFAULT);
+ VERIFY(ret, FAIL, "H5Acreate");
+
/* Create an attribute for the dataset */
attr=H5Acreate(dataset,ATTR1_NAME,H5T_NATIVE_INT32,sid2,H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate");
@@ -326,7 +330,7 @@ test_attr_complex_write(void)
CHECK(attr, FAIL, "H5Acreate");
/* Try to create the same attribute again (should fail) */
- ret=H5Acreate(dataset,ATTR4_NAME,H5T_NATIVE_INT32,sid2,H5P_DEFAULT);
+ ret=H5Acreate(dataset,ATTR4_NAME,tid1,sid2,H5P_DEFAULT);
VERIFY(ret, FAIL, "H5Acreate");
/* Write complex attribute data */
@@ -992,7 +996,7 @@ test_attr_delete(void)
/* Try to delete bogus attribute */
ret=H5Adelete(dataset,"Bogus");
- CHECK(ret, FAIL, "H5Adelete");
+ VERIFY(ret, FAIL, "H5Adelete");
/* Verify the correct number of attributes */
ret=H5Anum_attrs(dataset);
diff --git a/test/tstab.c b/test/tstab.c
index 291dbd4..21b9be4 100644
--- a/test/tstab.c
+++ b/test/tstab.c
@@ -118,6 +118,12 @@ test_2(void)
CHECK_I(status, "H5Gclose");
}
+ /* close the property lists */
+ status = H5Pclose(create_plist);
+ CHECK_I(status, "H5Pclose");
+ status = H5Pclose(access_plist);
+ CHECK_I(status, "H5Pclose");
+
/* close the file */
status = H5Fclose(fid);
CHECK_I(status, "H5Fclose");