test all orders fo lengths <= 3
svn: r16900
This commit is contained in:
parent
e2cd7a51e5
commit
9473d1809f
|
@ -113,7 +113,18 @@
|
|||
(for-each (lambda (l) (test '((0 2) (0 3) (1 1)) sort* l))
|
||||
'(((1 1) (0 2) (0 3))
|
||||
((0 2) (1 1) (0 3))
|
||||
((0 2) (0 3) (1 1)))))
|
||||
((0 2) (0 3) (1 1))))
|
||||
;; exhaustive tests for 2 and 3 item lists
|
||||
(for-each (lambda (l) (test '((1 x) (2 y)) sort* l))
|
||||
'(((1 x) (2 y))
|
||||
((2 y) (1 x))))
|
||||
(for-each (lambda (l) (test '((1 x) (2 y) (3 z)) sort* l))
|
||||
'(((1 x) (2 y) (3 z))
|
||||
((2 y) (1 x) (3 z))
|
||||
((2 y) (3 z) (1 x))
|
||||
((3 z) (2 y) (1 x))
|
||||
((3 z) (1 x) (2 y))
|
||||
((1 x) (3 z) (2 y)))))
|
||||
;; test #:key and #:cache-keys?
|
||||
(let ()
|
||||
(define l '((0) (9) (1) (8) (2) (7) (3) (6) (4) (5)))
|
||||
|
|
Loading…
Reference in New Issue
Block a user