summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-06-11 20:02:27 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-06-11 20:02:27 (GMT)
commit1b082cf2c20eecc1ac91e3489bfc6105d05a3f48 (patch)
tree374546edf973ac09b7c68331976ffbe6df44dadd /test
parent2206ffc090aeb60f8bdd81aba4abe6c2420fdfcd (diff)
downloadhdf5-1b082cf2c20eecc1ac91e3489bfc6105d05a3f48.zip
hdf5-1b082cf2c20eecc1ac91e3489bfc6105d05a3f48.tar.gz
hdf5-1b082cf2c20eecc1ac91e3489bfc6105d05a3f48.tar.bz2
[svn-r5597] Purpose:
Code cleanup Description: The test for inserting a compound datatype into itself (which should fail) is issuing warnings about this failure. Solution: Turn the warnings off during this test. Platforms tested: FreeBSD 4.5 (sleipnir)
Diffstat (limited to 'test')
-rw-r--r--test/dtypes.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/dtypes.c b/test/dtypes.c
index 1dbd650..4693a4d 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -391,6 +391,7 @@ test_compound_1(void)
{
complex_t tmp;
hid_t complex_id;
+ herr_t ret;
TESTING("compound data types");
@@ -398,7 +399,14 @@ test_compound_1(void)
if ((complex_id = H5Tcreate(H5T_COMPOUND, sizeof tmp))<0) goto error;
/* Attempt to add the new compound datatype as a field within itself */
- if (H5Tinsert(complex_id, "compound", 0, complex_id)>=0) goto error;
+ H5E_BEGIN_TRY {
+ ret=H5Tinsert(complex_id, "compound", 0, complex_id);
+ } H5E_END_TRY;
+ if (ret>=0) {
+ H5_FAILED();
+ printf("Inserted compound datatype into itself?\n");
+ goto error;
+ } /* end if */
/* Add a couple fields */
if (H5Tinsert(complex_id, "real", HOFFSET(complex_t, re),