Test count and contains.

This commit is contained in:
Dominik Pantůček 2023-07-06 22:02:59 +02:00
parent 5fc654d57e
commit 0683a20166

View file

@ -189,6 +189,23 @@
((bst? 'fixnum) "string"))
(test-true bst-empty?
(bst-empty? (make-bst 'fixnum eq? <)))
(test-true bst-contains?
(bst-contains?
(bst-set
(make-bst 'fixnum eq? <)
1 2) 1))
(test-false bst-contains?
(bst-contains? (make-bst 'fixnum eq? <) 1))
(test-equal? bst-count
(bst-count
(make-bst 'fixnum eq? <))
0)
(test-equal? bst-count
(bst-count
(bst-set
(make-bst 'fixnum eq? <)
1 2))
1)
))
)