summaryrefslogtreecommitdiffstats
path: root/test/tmisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/tmisc.c')
-rw-r--r--test/tmisc.c225
1 files changed, 180 insertions, 45 deletions
diff --git a/test/tmisc.c b/test/tmisc.c
index 3a70c23..24539d2 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -1894,7 +1894,10 @@ test_misc11(void)
CHECK(ret, FAIL, "H5Pset_sizes");
/* This should fail as (32770*2) will exceed ^16 - 2 bytes for storing btree entries */
- H5E_BEGIN_TRY { ret = H5Pset_sym_k(fcpl, 32770, 0); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Pset_sym_k(fcpl, 32770, 0);
+ }
H5E_END_TRY;
VERIFY(ret, FAIL, "H5Pset_sym_k");
@@ -1902,7 +1905,10 @@ test_misc11(void)
CHECK(ret, FAIL, "H5Pset_sym_k");
/* This should fail as (32770*2) will exceed ^16 - 2 bytes for storing btree entries */
- H5E_BEGIN_TRY { ret = H5Pset_istore_k(fcpl, 32770); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Pset_istore_k(fcpl, 32770);
+ }
H5E_END_TRY;
VERIFY(ret, FAIL, "H5Pset_istore_k");
@@ -3160,7 +3166,10 @@ test_misc19(void)
VERIFY(rc, 0, "H5Idec_ref");
/* Try closing the file again (should fail) */
- H5E_BEGIN_TRY { ret = H5Fclose(fid); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Fclose(fid);
+ }
H5E_END_TRY;
VERIFY(ret, FAIL, "H5Fclose");
@@ -3191,7 +3200,10 @@ test_misc19(void)
VERIFY(rc, 0, "H5Idec_ref");
/* Try closing the property list again (should fail) */
- H5E_BEGIN_TRY { ret = H5Pclose(plid); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Pclose(plid);
+ }
H5E_END_TRY;
VERIFY(ret, FAIL, "H5Pclose");
@@ -3222,7 +3234,10 @@ test_misc19(void)
VERIFY(rc, 0, "H5Idec_ref");
/* Try closing the property class again (should fail) */
- H5E_BEGIN_TRY { ret = H5Pclose_class(pcid); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Pclose_class(pcid);
+ }
H5E_END_TRY;
VERIFY(ret, FAIL, "H5Pclose_class");
@@ -3253,7 +3268,10 @@ test_misc19(void)
VERIFY(rc, 0, "H5Idec_ref");
/* Try closing the datatype again (should fail) */
- H5E_BEGIN_TRY { ret = H5Tclose(tid); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Tclose(tid);
+ }
H5E_END_TRY;
VERIFY(ret, FAIL, "H5Tclose");
@@ -3284,7 +3302,10 @@ test_misc19(void)
VERIFY(rc, 0, "H5Idec_ref");
/* Try closing the dataspace again (should fail) */
- H5E_BEGIN_TRY { ret = H5Sclose(sid); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Sclose(sid);
+ }
H5E_END_TRY;
VERIFY(ret, FAIL, "H5Sclose");
@@ -3323,7 +3344,10 @@ test_misc19(void)
VERIFY(rc, 0, "H5Idec_ref");
/* Try closing the dataset again (should fail) */
- H5E_BEGIN_TRY { ret = H5Dclose(did); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Dclose(did);
+ }
H5E_END_TRY;
VERIFY(ret, FAIL, "H5Dclose");
@@ -3374,7 +3398,10 @@ test_misc19(void)
VERIFY(rc, 0, "H5Idec_ref");
/* Try closing the attribute again (should fail) */
- H5E_BEGIN_TRY { ret = H5Aclose(aid); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Aclose(aid);
+ }
H5E_END_TRY;
VERIFY(ret, FAIL, "H5Aclose");
@@ -3421,7 +3448,10 @@ test_misc19(void)
VERIFY(rc, 0, "H5Idec_ref");
/* Try closing the group again (should fail) */
- H5E_BEGIN_TRY { ret = H5Gclose(gid); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Gclose(gid);
+ }
H5E_END_TRY;
VERIFY(ret, FAIL, "H5Gclose");
@@ -3456,7 +3486,10 @@ test_misc19(void)
VERIFY(rc, 0, "H5Idec_ref");
/* Try closing the error class again (should fail) */
- H5E_BEGIN_TRY { ret = H5Eunregister_class(ecid); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Eunregister_class(ecid);
+ }
H5E_END_TRY;
VERIFY(ret, FAIL, "H5Eunregister_class");
@@ -3491,7 +3524,10 @@ test_misc19(void)
VERIFY(rc, 0, "H5Idec_ref");
/* Try closing the error message again (should fail) */
- H5E_BEGIN_TRY { ret = H5Eclose_msg(emid); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Eclose_msg(emid);
+ }
H5E_END_TRY;
VERIFY(ret, FAIL, "H5Eclose_msg");
@@ -3526,7 +3562,10 @@ test_misc19(void)
VERIFY(rc, 0, "H5Idec_ref");
/* Try closing the error stack again (should fail) */
- H5E_BEGIN_TRY { ret = H5Eclose_stack(esid); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Eclose_stack(esid);
+ }
H5E_END_TRY;
VERIFY(ret, FAIL, "H5Eclose_stack");
@@ -3561,7 +3600,10 @@ test_misc19(void)
VERIFY(rc, 0, "H5Idec_ref");
/* Try unregistering the VFD again (should fail) */
- H5E_BEGIN_TRY { ret = H5FDunregister(vfdid); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5FDunregister(vfdid);
+ }
H5E_END_TRY;
VERIFY(ret, FAIL, "H5FDunregister");
@@ -3598,7 +3640,10 @@ test_misc19(void)
VERIFY(rc, 0, "H5Idec_ref");
/* Try unregistering the VOL connector again (should fail) */
- H5E_BEGIN_TRY { ret = H5VLunregister_connector(volid); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5VLunregister_connector(volid);
+ }
H5E_END_TRY;
VERIFY(ret, FAIL, "H5VLunregister_connector");
@@ -4036,7 +4081,10 @@ test_misc23(void)
* test the old APIs
**********************************************************************/
- H5E_BEGIN_TRY { tmp_id = H5Gcreate1(file_id, "/A/B00a/grp", (size_t)0); }
+ H5E_BEGIN_TRY
+ {
+ tmp_id = H5Gcreate1(file_id, "/A/B00a/grp", (size_t)0);
+ }
H5E_END_TRY;
VERIFY(tmp_id, FAIL, "H5Gcreate1");
@@ -4046,7 +4094,10 @@ test_misc23(void)
status = H5Gclose(tmp_id);
CHECK(status, FAIL, "H5Gclose");
- H5E_BEGIN_TRY { tmp_id = H5Dcreate1(file_id, "/A/B00c/dset", type_id, space_id, create_id); }
+ H5E_BEGIN_TRY
+ {
+ tmp_id = H5Dcreate1(file_id, "/A/B00c/dset", type_id, space_id, create_id);
+ }
H5E_END_TRY;
VERIFY(tmp_id, FAIL, "H5Dcreate1");
@@ -4379,51 +4430,87 @@ test_misc24(void)
CHECK(ret, FAIL, "H5Tclose");
/* Attempt to open each kind of object with wrong API, including using soft links */
- H5E_BEGIN_TRY { tmp_id = H5Dopen2(file_id, MISC24_GROUP_NAME, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ tmp_id = H5Dopen2(file_id, MISC24_GROUP_NAME, H5P_DEFAULT);
+ }
H5E_END_TRY;
VERIFY(tmp_id, FAIL, "H5Dopen2");
- H5E_BEGIN_TRY { tmp_id = H5Dopen2(file_id, MISC24_GROUP_LINK, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ tmp_id = H5Dopen2(file_id, MISC24_GROUP_LINK, H5P_DEFAULT);
+ }
H5E_END_TRY;
VERIFY(tmp_id, FAIL, "H5Dopen2");
- H5E_BEGIN_TRY { tmp_id = H5Topen2(file_id, MISC24_GROUP_NAME, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ tmp_id = H5Topen2(file_id, MISC24_GROUP_NAME, H5P_DEFAULT);
+ }
H5E_END_TRY;
VERIFY(tmp_id, FAIL, "H5Topen2");
- H5E_BEGIN_TRY { tmp_id = H5Topen2(file_id, MISC24_GROUP_LINK, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ tmp_id = H5Topen2(file_id, MISC24_GROUP_LINK, H5P_DEFAULT);
+ }
H5E_END_TRY;
VERIFY(tmp_id, FAIL, "H5Topen2");
- H5E_BEGIN_TRY { tmp_id = H5Gopen2(file_id, MISC24_DATASET_NAME, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ tmp_id = H5Gopen2(file_id, MISC24_DATASET_NAME, H5P_DEFAULT);
+ }
H5E_END_TRY;
VERIFY(tmp_id, FAIL, "H5Gopen2");
- H5E_BEGIN_TRY { tmp_id = H5Gopen2(file_id, MISC24_DATASET_LINK, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ tmp_id = H5Gopen2(file_id, MISC24_DATASET_LINK, H5P_DEFAULT);
+ }
H5E_END_TRY;
VERIFY(tmp_id, FAIL, "H5Gopen2");
- H5E_BEGIN_TRY { tmp_id = H5Topen2(file_id, MISC24_DATASET_NAME, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ tmp_id = H5Topen2(file_id, MISC24_DATASET_NAME, H5P_DEFAULT);
+ }
H5E_END_TRY;
VERIFY(tmp_id, FAIL, "H5Topen2");
- H5E_BEGIN_TRY { tmp_id = H5Topen2(file_id, MISC24_DATASET_LINK, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ tmp_id = H5Topen2(file_id, MISC24_DATASET_LINK, H5P_DEFAULT);
+ }
H5E_END_TRY;
VERIFY(tmp_id, FAIL, "H5Topen2");
- H5E_BEGIN_TRY { tmp_id = H5Gopen2(file_id, MISC24_DATATYPE_NAME, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ tmp_id = H5Gopen2(file_id, MISC24_DATATYPE_NAME, H5P_DEFAULT);
+ }
H5E_END_TRY;
VERIFY(tmp_id, FAIL, "H5Gopen2");
- H5E_BEGIN_TRY { tmp_id = H5Gopen2(file_id, MISC24_DATATYPE_LINK, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ tmp_id = H5Gopen2(file_id, MISC24_DATATYPE_LINK, H5P_DEFAULT);
+ }
H5E_END_TRY;
VERIFY(tmp_id, FAIL, "H5Gopen2");
- H5E_BEGIN_TRY { tmp_id = H5Dopen2(file_id, MISC24_DATATYPE_NAME, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ tmp_id = H5Dopen2(file_id, MISC24_DATATYPE_NAME, H5P_DEFAULT);
+ }
H5E_END_TRY;
VERIFY(tmp_id, FAIL, "H5Dopen2");
- H5E_BEGIN_TRY { tmp_id = H5Dopen2(file_id, MISC24_DATATYPE_LINK, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ tmp_id = H5Dopen2(file_id, MISC24_DATATYPE_LINK, H5P_DEFAULT);
+ }
H5E_END_TRY;
VERIFY(tmp_id, FAIL, "H5Dopen2");
@@ -4432,19 +4519,31 @@ test_misc24(void)
group_id = H5Gopen2(file_id, MISC24_GROUP_NAME, H5P_DEFAULT);
CHECK(group_id, FAIL, "H5Gopen2");
- H5E_BEGIN_TRY { tmp_id = H5Dopen2(file_id, MISC24_GROUP_NAME, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ tmp_id = H5Dopen2(file_id, MISC24_GROUP_NAME, H5P_DEFAULT);
+ }
H5E_END_TRY;
VERIFY(tmp_id, FAIL, "H5Dopen2");
- H5E_BEGIN_TRY { tmp_id = H5Dopen2(file_id, MISC24_GROUP_LINK, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ tmp_id = H5Dopen2(file_id, MISC24_GROUP_LINK, H5P_DEFAULT);
+ }
H5E_END_TRY;
VERIFY(tmp_id, FAIL, "H5Dopen2");
- H5E_BEGIN_TRY { tmp_id = H5Topen2(file_id, MISC24_GROUP_NAME, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ tmp_id = H5Topen2(file_id, MISC24_GROUP_NAME, H5P_DEFAULT);
+ }
H5E_END_TRY;
VERIFY(tmp_id, FAIL, "H5Topen2");
- H5E_BEGIN_TRY { tmp_id = H5Topen2(file_id, MISC24_GROUP_LINK, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ tmp_id = H5Topen2(file_id, MISC24_GROUP_LINK, H5P_DEFAULT);
+ }
H5E_END_TRY;
VERIFY(tmp_id, FAIL, "H5Topen2");
@@ -4455,19 +4554,31 @@ test_misc24(void)
dset_id = H5Dopen2(file_id, MISC24_DATASET_NAME, H5P_DEFAULT);
CHECK(dset_id, FAIL, "H5Dopen2");
- H5E_BEGIN_TRY { tmp_id = H5Gopen2(file_id, MISC24_DATASET_NAME, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ tmp_id = H5Gopen2(file_id, MISC24_DATASET_NAME, H5P_DEFAULT);
+ }
H5E_END_TRY;
VERIFY(tmp_id, FAIL, "H5Gopen2");
- H5E_BEGIN_TRY { tmp_id = H5Gopen2(file_id, MISC24_DATASET_LINK, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ tmp_id = H5Gopen2(file_id, MISC24_DATASET_LINK, H5P_DEFAULT);
+ }
H5E_END_TRY;
VERIFY(tmp_id, FAIL, "H5Gopen2");
- H5E_BEGIN_TRY { tmp_id = H5Topen2(file_id, MISC24_DATASET_NAME, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ tmp_id = H5Topen2(file_id, MISC24_DATASET_NAME, H5P_DEFAULT);
+ }
H5E_END_TRY;
VERIFY(tmp_id, FAIL, "H5Topen2");
- H5E_BEGIN_TRY { tmp_id = H5Topen2(file_id, MISC24_DATASET_LINK, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ tmp_id = H5Topen2(file_id, MISC24_DATASET_LINK, H5P_DEFAULT);
+ }
H5E_END_TRY;
VERIFY(tmp_id, FAIL, "H5Topen2");
@@ -4478,19 +4589,31 @@ test_misc24(void)
type_id = H5Topen2(file_id, MISC24_DATATYPE_NAME, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Topen2");
- H5E_BEGIN_TRY { tmp_id = H5Gopen2(file_id, MISC24_DATATYPE_NAME, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ tmp_id = H5Gopen2(file_id, MISC24_DATATYPE_NAME, H5P_DEFAULT);
+ }
H5E_END_TRY;
VERIFY(tmp_id, FAIL, "H5Gopen2");
- H5E_BEGIN_TRY { tmp_id = H5Gopen2(file_id, MISC24_DATATYPE_LINK, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ tmp_id = H5Gopen2(file_id, MISC24_DATATYPE_LINK, H5P_DEFAULT);
+ }
H5E_END_TRY;
VERIFY(tmp_id, FAIL, "H5Gopen2");
- H5E_BEGIN_TRY { tmp_id = H5Dopen2(file_id, MISC24_DATATYPE_NAME, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ tmp_id = H5Dopen2(file_id, MISC24_DATATYPE_NAME, H5P_DEFAULT);
+ }
H5E_END_TRY;
VERIFY(tmp_id, FAIL, "H5Dopen2");
- H5E_BEGIN_TRY { tmp_id = H5Dopen2(file_id, MISC24_DATATYPE_LINK, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ tmp_id = H5Dopen2(file_id, MISC24_DATATYPE_LINK, H5P_DEFAULT);
+ }
H5E_END_TRY;
VERIFY(tmp_id, FAIL, "H5Dopen2");
@@ -5076,7 +5199,10 @@ test_misc27(void)
#ifdef H5_STRICT_FORMAT_CHECKS
/* Open group with incorrect # of object header messages (should fail) */
- H5E_BEGIN_TRY { gid = H5Gopen2(fid, MISC27_GROUP, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ gid = H5Gopen2(fid, MISC27_GROUP, H5P_DEFAULT);
+ }
H5E_END_TRY;
VERIFY(gid, FAIL, "H5Gopen2");
#else /* H5_STRICT_FORMAT_CHECKS */
@@ -5569,17 +5695,26 @@ test_misc33(void)
CHECK(fid, FAIL, "H5Fopen");
/* Case (1) */
- H5E_BEGIN_TRY { ret = H5Oget_info_by_name3(fid, "/soft_two", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Oget_info_by_name3(fid, "/soft_two", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
+ }
H5E_END_TRY;
VERIFY(ret, FAIL, "H5Oget_info_by_name3");
/* Case (2) */
- H5E_BEGIN_TRY { ret = H5Oget_info_by_name3(fid, "/dsetA", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Oget_info_by_name3(fid, "/dsetA", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
+ }
H5E_END_TRY;
VERIFY(ret, FAIL, "H5Oget_info_by_name3");
/* Case (3) */
- H5E_BEGIN_TRY { ret = H5Oget_info_by_name3(fid, "/soft_one", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Oget_info_by_name3(fid, "/soft_one", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
+ }
H5E_END_TRY;
VERIFY(ret, FAIL, "H5Oget_info_by_name3");