[elephant-devel] bug in map-inverted-index
Ryszard Szopa
ryszard.szopa at gmail.com
Mon May 12 18:08:18 UTC 2008
Hey,
map-inverted-index shows some strange behavior. When you pass it
`start' and `end' arguments and there are no objects that satisfy the
range, it maps over the first object greater than end. I haven't have
time to investigate it thoroughly, but I have written a 5am unit-test
(you are using this test framework, aren't you?).
(defpclass foo ()
((str :type string
:initarg :str
:reader str-of
:index t)))
(test map-inverted-index-1
(with-open-store (`(:bdb "/tmp/store/"))
(drop-instances (get-instances-by-class 'foo))
(loop :for st :in '("a" "b" "c" "d" "g" "ga" "gb" "gc" "z")
:do (make-instance 'foo :str st))
(is (null (map-inverted-index (lambda (x y)
(declare (ignore y))
x) 'foo 'str :start "f" :end "fz" :collect t)))))
This was on Ubuntu Hardy Heron, with BerkeleyDB 4.5 from Ubuntu
packages, SBCL 1.0.15 and the newest unstable branch of Elephant (I've
just made darcs pull). Funny enough, a friend of mine who is using a
Macintosh is not getting this bug (he also uses unstable but I'm not
sure whether it is the newest version).
--
http://szopa.tasak.gda.pl/
More information about the elephant-devel
mailing list