[cl-containers-devel] Problems with priority queues
Gary King
gwking at metabang.com
Wed Oct 24 13:46:07 UTC 2007
Hi Josip,
Dang. You have got to stop finding these bugs. I'll get all depressed
and embarrassed.
Seriously, thanks for the bug find, the test case and the pointer to
the fix. I'll keep these out very soon.
Thanks for your perseverance,
On Oct 22, 2007, at 7:02 AM, Josip Gracin wrote:
> Hi Gary!
>
> It's me and my queues again. :-) Here's a test that fails on
> Containers version 0.9.8, i.e. the latest from asdf-install. I've
> created a separate test file for priority queues so that you can
> easily add it to the test suite, if you like.
>
> ------------------------------------------------------------
> tests/test-prio-queue.lisp
> ------------------------------------------------------------
>
> (in-package #:cl-containers-test)
>
> (deftestsuite test-prio-queue ()
> ((q (make-instance 'priority-queue-on-container
> :sorter #'string<
> :test #'string=))))
>
> (deftestsuite test-delete-prio-queue (test-prio-queue)
> ()
> (:setup (insert-item q "a")
> (insert-item q "b")
> (insert-item q "c")))
>
> (addtest (test-delete-prio-queue)
> delete-first-1
> (delete-first q)
> (ensure-same (first-element q) "b")
> (delete-first q)
> (ensure-same (first-element q) "c"))
>
> --------------------------------------------------------------
>
>
> Not calling ELEMENT in queues.lisp:76 solves the problem.
>
> _______________________________________________
> cl-containers-devel mailing list
> cl-containers-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/cl-containers-devel
--
Gary Warren King, metabang.com
Cell: (413) 559 8738
Fax: (206) 338-4052
gwkkwg on Skype * garethsan on AIM
More information about the cl-containers-devel
mailing list