diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/tattr.c | 8 | ||||
-rw-r--r-- | test/tstab.c | 6 |
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"); |