diff --git a/src/util-bst.scm b/src/util-bst.scm index 03b5cfc..8abb088 100644 --- a/src/util-bst.scm +++ b/src/util-bst.scm @@ -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) )) )