Test output for treap
Testing time: 8.0s
CHICKEN_INSTALL_PREFIX=/root/src/salmonella/salmonella-4.5.0/repo CHICKEN_INCLUDE_PATH=/root/src/salmonella/salmonella-4.5.0/repo/share/chicken CHICKEN_REPOSITORY=/root/src/salmonella/salmonella-4.5.0/repo/lib/chicken/5 /usr/local/chicken-4.5.0/bin/csi -script run.scm -- testing --> Sorting of a set of numbers via a treap ----------------------- (treap 'empty?) ...................................................... [ PASS] (zero? (treap 'size)) ................................................ [ PASS] (zero? (treap 'depth)) ............................................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] treap depth: 7 The treap contains 12 nodes level 5 (-1 . 0), kids (#f . #f), prio 18974.0 level 4 (0 . 1), kids (#t . #t), prio 16125.0 level 6 (1 . 2), kids (#f . #f), prio 26786.0 level 5 (2 . 3), kids (#t . #t), prio 25456.0 level 6 (3 . 4), kids (#f . #f), prio 31560.0 level 3 (4 . 5), kids (#t . #f), prio 11134.0 level 2 (5 . 6), kids (#t . #t), prio 8992.0 level 3 (6 . 7), kids (#f . #f), prio 13304.0 level 1 (7 . 8), kids (#t . #f), prio 2482.0 level 0 (8 . 9), kids (#t . #t), prio 67.0 level 1 (9 . 10), kids (#f . #t), prio 9426.0 level 2 (10 . 11), kids (#f . #f), prio 12002.0 (treap 'size) ........................................................ [ PASS] (not (treap 'empty?)) ................................................ [ PASS] (treap 'get-min) ..................................................... [ PASS] (treap 'get-max) ..................................................... [ PASS] (treap 'get-min) ..................................................... [ PASS] (treap 'get-max) ..................................................... [ PASS] ((treap 'get) (++ min-key)) .......................................... [ PASS] ((treap 'get) (++ min-key) #f) ....................................... [ PASS] (not ((treap 'get) (-- min-key) #f)) ................................. [ PASS] (treap 'empty?) ...................................................... [ PASS] (zero? (treap 'size)) ................................................ [ PASS] (zero? (treap 'depth)) ............................................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] treap depth: 6 The treap contains 12 nodes level 2 (-1 . 0), kids (#f . #f), prio 19163.0 level 1 (0 . 1), kids (#t . #t), prio 7039.0 level 3 (1 . 2), kids (#f . #t), prio 11785.0 level 5 (2 . 3), kids (#f . #f), prio 31343.0 level 4 (3 . 4), kids (#t . #f), prio 14606.0 level 2 (4 . 5), kids (#t . #t), prio 8558.0 level 3 (5 . 6), kids (#f . #t), prio 22201.0 level 4 (6 . 7), kids (#f . #f), prio 27871.0 level 0 (7 . 8), kids (#t . #t), prio 4841.0 level 2 (8 . 9), kids (#f . #t), prio 11813.0 level 3 (9 . 10), kids (#f . #f), prio 21116.0 level 1 (10 . 11), kids (#t . #f), prio 6388.0 (treap 'get-min) ..................................................... [ PASS] (treap 'delete-min!) ................................................. [ PASS] (not ((treap 'get) min-key #f)) ...................................... [ PASS] (treap 'get-min) ..................................................... [ PASS] (treap 'get-max) ..................................................... [ PASS] (treap 'delete-max!) ................................................. [ PASS] (not ((treap 'get) max-key #f)) ...................................... [ PASS] ((treap 'get) (-- max-key)) .......................................... [ PASS] (+ -2 (++ (- max-key min-key))) ...................................... [ PASS] ((treap 'get) i #f) .................................................. [ PASS] (treap 'delete-min!) ................................................. [ PASS] (not ((treap 'get) i #f)) ............................................ [ PASS] ((treap 'get) i #f) .................................................. [ PASS] (treap 'delete-min!) ................................................. [ PASS] (not ((treap 'get) i #f)) ............................................ [ PASS] ((treap 'get) i #f) .................................................. [ PASS] (treap 'delete-min!) ................................................. [ PASS] (not ((treap 'get) i #f)) ............................................ [ PASS] ((treap 'get) i #f) .................................................. [ PASS] (treap 'delete-min!) ................................................. [ PASS] (not ((treap 'get) i #f)) ............................................ [ PASS] ((treap 'get) i #f) .................................................. [ PASS] (treap 'delete-min!) ................................................. [ PASS] (not ((treap 'get) i #f)) ............................................ [ PASS] ((treap 'get) i #f) .................................................. [ PASS] (treap 'delete-min!) ................................................. [ PASS] (not ((treap 'get) i #f)) ............................................ [ PASS] ((treap 'get) i #f) .................................................. [ PASS] (treap 'delete-min!) ................................................. [ PASS] (not ((treap 'get) i #f)) ............................................ [ PASS] ((treap 'get) i #f) .................................................. [ PASS] (treap 'delete-min!) ................................................. [ PASS] (not ((treap 'get) i #f)) ............................................ [ PASS] ((treap 'get) i #f) .................................................. [ PASS] (treap 'delete-min!) ................................................. [ PASS] (not ((treap 'get) i #f)) ............................................ [ PASS] ((treap 'get) i #f) .................................................. [ PASS] (treap 'delete-min!) ................................................. [ PASS] (not ((treap 'get) i #f)) ............................................ [ PASS] (treap 'empty?) ...................................................... [ PASS] (zero? (treap 'size)) ................................................ [ PASS] (zero? (treap 'depth)) ............................................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] (not ((treap 'put!) j (cdr (compute-assoc j)))) ...................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] (not ((treap 'put!) j (cdr (compute-assoc j)))) ...................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] (not ((treap 'put!) j (cdr (compute-assoc j)))) ...................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] (not ((treap 'put!) j (cdr (compute-assoc j)))) ...................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] (not ((treap 'put!) j (cdr (compute-assoc j)))) ...................... [ PASS] (not ((treap 'put!) i (cdr (compute-assoc i)))) ...................... [ PASS] (not ((treap 'put!) j (cdr (compute-assoc j)))) ...................... [ PASS] ((treap 'get) a-key) ................................................. [ PASS] ((treap 'put!) a-key (cdr new-assoc)) ................................ [ PASS] ((treap 'get) a-key) ................................................. [ PASS] ((treap 'delete!) a-key) ............................................. [ PASS] (not ((treap 'delete!) a-key #f)) .................................... [ PASS] (not ((treap 'put!) a-key (cdr old-assoc))) .......................... [ PASS] ((treap 'put!) a-key (cdr old-assoc)) ................................ [ PASS] ((treap 'get) a-key) ................................................. [ PASS] (++ (- max-key min-key)) ............................................. [ PASS] treap depth: 5 (not (treap 'empty?)) ................................................ [ PASS] (compute-assoc expected-key) ......................................... [ PASS] (compute-assoc expected-key) ......................................... [ PASS] (compute-assoc expected-key) ......................................... [ PASS] (compute-assoc expected-key) ......................................... [ PASS] (compute-assoc expected-key) ......................................... [ PASS] (compute-assoc expected-key) ......................................... [ PASS] (compute-assoc expected-key) ......................................... [ PASS] (compute-assoc expected-key) ......................................... [ PASS] (compute-assoc expected-key) ......................................... [ PASS] (compute-assoc expected-key) ......................................... [ PASS] (compute-assoc expected-key) ......................................... [ PASS] (compute-assoc expected-key) ......................................... [ PASS] (++ max-key) ......................................................... [ PASS] (compute-assoc expected-key) ......................................... [ PASS] (compute-assoc expected-key) ......................................... [ PASS] (compute-assoc expected-key) ......................................... [ PASS] (compute-assoc expected-key) ......................................... [ PASS] (compute-assoc expected-key) ......................................... [ PASS] (compute-assoc expected-key) ......................................... [ PASS] (compute-assoc expected-key) ......................................... [ PASS] (compute-assoc expected-key) ......................................... [ PASS] (compute-assoc expected-key) ......................................... [ PASS] (compute-assoc expected-key) ......................................... [ PASS] (compute-assoc expected-key) ......................................... [ PASS] (compute-assoc expected-key) ......................................... [ PASS] (-- min-key) ......................................................... [ PASS] 129 tests completed in 0.02 seconds. 129 out of 129 (100%) tests passed. -- done testing --> Sorting of a set of numbers via a treap ------------------