projects
/
idzebra-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added framework for the pos calls. rsisamb and rsnull have a real one,
[idzebra-moved-to-github.git]
/
isamb
/
tstisamb.c
diff --git
a/isamb/tstisamb.c
b/isamb/tstisamb.c
index
66a2b2f
..
253bc1f
100644
(file)
--- a/
isamb/tstisamb.c
+++ b/
isamb/tstisamb.c
@@
-1,4
+1,4
@@
-/* $Id: tstisamb.c,v 1.5 2004-06-02 12:30:32 adam Exp $
+/* $Id: tstisamb.c,v 1.7 2004-08-03 14:54:41 heikki Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
@@
-96,7
+96,6
@@
void tst_forward(ISAMB isb, int n)
struct read_info ri;
int i;
ISAMB_PP pp;
struct read_info ri;
int i;
ISAMB_PP pp;
- char key_buf[10];
/* insert a number of entries */
ri.no = 0;
/* insert a number of entries */
ri.no = 0;
@@
-110,12
+109,12
@@
void tst_forward(ISAMB isb, int n)
/* read the entries */
pp = isamb_pp_open (isb, isamc_p);
/* read the entries */
pp = isamb_pp_open (isb, isamc_p);
- for (i = 0; i<ri.max; i++)
+ for (i = 0; i<ri.max; i +=2 )
{
int x = -1;
int xu = i;
isamb_pp_forward(pp, &x, &xu);
{
int x = -1;
int xu = i;
isamb_pp_forward(pp, &x, &xu);
- if (x != xu)
+ if (x != xu && xu != x+1)
{
yaz_log(LOG_WARN, "isamb_pp_forward (1). Got %d (expected %d)",
x, xu);
{
yaz_log(LOG_WARN, "isamb_pp_forward (1). Got %d (expected %d)",
x, xu);
@@
-129,12
+128,12
@@
void tst_forward(ISAMB isb, int n)
for (i = 0; i<ri.max; i += 100)
{
int x = -1;
for (i = 0; i<ri.max; i += 100)
{
int x = -1;
- int xuntil = i;
- isamb_pp_forward(pp, &x, &xuntil);
- if (x > xuntil)
+ int xu = i;
+ isamb_pp_forward(pp, &x, &xu);
+ if (x != xu && xu != x+1)
{
yaz_log(LOG_WARN, "isamb_pp_forward (2). Got %d (expected %d)",
{
yaz_log(LOG_WARN, "isamb_pp_forward (2). Got %d (expected %d)",
- x, xuntil);
+ x, xu);
exit(4);
}
ri.no++;
exit(4);
}
ri.no++;