[cl-containers-devel] Problems with priority queues
Josip Gracin
josip.gracin at gmail.com
Mon Oct 22 11:24:33 UTC 2007
Sorry if two copies of the following mail make it to the list. The
first was sent from address which is not my subscription address.
=========================================================================
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.
More information about the cl-containers-devel
mailing list