Skip to content

Commit

Permalink
Additional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hargettp committed Feb 27, 2011
1 parent fc869e7 commit 127884e
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions tests.lisp
Expand Up @@ -148,8 +148,23 @@

(with-temporary-tree (tree)
(with-rb-transaction (tree)
(rb-put tree 1 "one")
(assert-eq :black (hh-redblack::color (hh-redblack::root tree)))))
(rb-put tree 1 "one"))
(with-rb-transaction (tree)
(rb-put tree 2 "two"))
(with-rb-transaction (tree)
(assert-equal `(1 2) (rb-keys tree))))

(with-temporary-tree (tree)
(with-rb-transaction (tree)
(rb-put tree 1 "one"))
(with-rb-transaction (tree)
(rb-put tree 2 "two"))
(with-rb-transaction (tree)
(rb-put tree 3 "two"))
(with-rb-transaction (tree)
(rb-remove tree 2))
(with-rb-transaction (tree)
(assert-equal `(1 3) (rb-keys tree))))

(with-temporary-tree (tree)
(with-rb-transaction (tree)
Expand Down

0 comments on commit 127884e

Please sign in to comment.