racket / data

Other
16 stars 23 forks source link

Handle non-adjustable trees in splay-tree->list #30

Closed soegaard closed 10 months ago

soegaard commented 1 year ago

Tests

(define s (make-adjustable-splay-tree)) (splay-tree-set! s 1 'a) (splay-tree-set! s 2 'b) (splay-tree-set! s 3 'c) (splay-tree->list s)

(define t (make-splay-tree)) (splay-tree-set! t 1 'a) (splay-tree-set! t 2 'b) (splay-tree-set! t 3 'c) (splay-tree->list t)

sorawee commented 1 year ago

Does it make sense to add tests to https://github.com/racket/data/blob/master/data-test/tests/data/ordered-dict.rkt ?

soegaard commented 1 year ago

It does make sense to add tests - but it turns a 5 minute fix into a 1 hour fix for me. Feel free to add some test cases - see also initial test case in the original PR.

soegaard commented 1 year ago

Ping @rmculpepper