summaryrefslogtreecommitdiffstats
path: root/test/btree2.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2005-03-11 02:27:59 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2005-03-11 02:27:59 (GMT)
commit46dcfc7a497e25cad02c7cddf1b36df7614ea27e (patch)
treedc0f85d34bb1f61c2d143363560298f567a13f18 /test/btree2.c
parent5b7ebc2ff95e1dea0bd9517e360b7af98dbd0a4d (diff)
downloadhdf5-46dcfc7a497e25cad02c7cddf1b36df7614ea27e.zip
hdf5-46dcfc7a497e25cad02c7cddf1b36df7614ea27e.tar.gz
hdf5-46dcfc7a497e25cad02c7cddf1b36df7614ea27e.tar.bz2
[svn-r10185] Purpose:
New feature & bug fix Description: Allow NULL 'op' for find operations to easily query the existance of a record for a key during H5B2_find() operations. Fix H5B2_neighbor() to work properly with empty B-tree Platforms tested: FreeBSD 4.11 (sleipnir) Solaris 2.9 (shanti)
Diffstat (limited to 'test/btree2.c')
-rw-r--r--test/btree2.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/btree2.c b/test/btree2.c
index 80a5714..81d563d 100644
--- a/test/btree2.c
+++ b/test/btree2.c
@@ -223,10 +223,20 @@ test_insert_basic(hid_t fapl)
/* Should fail */
if(ret != FAIL) TEST_ERROR;
+ /* Try again with NULL 'op' */
+ H5E_BEGIN_TRY {
+ ret = H5B2_find(f, H5P_DATASET_XFER_DEFAULT, H5B2_TEST, bt2_addr, &idx, NULL, NULL);
+ } H5E_END_TRY;
+ /* Should fail */
+ if(ret != FAIL) TEST_ERROR;
+
/* Attempt to find existant record in B-tree with 1 record */
idx = 42;
if(H5B2_find(f, H5P_DATASET_XFER_DEFAULT, H5B2_TEST, bt2_addr, &idx, find_cb, &idx)<0) TEST_ERROR;
+ /* Try again with NULL 'op' */
+ if(H5B2_find(f, H5P_DATASET_XFER_DEFAULT, H5B2_TEST, bt2_addr, &idx, NULL, NULL)<0) TEST_ERROR;
+
/* Attempt to index non-existant record in B-tree with 1 record */
idx = 0;
H5E_BEGIN_TRY {