Raymond Toy pushed to branch issue-240-set-diff-with-hash-table at cmucl / cmucl
Commits: 12f6ff0e by Raymond Toy at 2023-07-24T15:35:18-07:00 Update set-diff tests
The hash table returns the results in the same order as the list version.
- - - - -
1 changed file:
- tests/sets.lisp
Changes:
===================================== tests/sets.lisp ===================================== @@ -12,12 +12,12 @@ (let ((lisp::*min-list-length-for-hashtable* 2)) (assert-equal '(2 2 1) (set-difference '(1 2 2 3) '(3 4))) - (assert-equal '(1 2 2) + (assert-equal '(2 2 1) (set-difference '(1 2 2 3) '(3 4 5 6 7 8))) (assert-equal '(2 2 1) (set-difference '(1 2 2 3) '(3 4) :test #'eql)) - (assert-equal '(1 2 2) + (assert-equal '(2 2 1) (set-difference '(1 2 2 3) '(3 4 5 6 7 8) :test #'eql))))
@@ -26,11 +26,11 @@ (let ((lisp::*min-list-length-for-hashtable* 2)) (assert-equal '(b b a) (set-difference '(a b b c) '(c d e) :test 'eq)) - (assert-equal '(a b b) + (assert-equal '(b b a) (set-difference '(a b b c) '(c d e f g h) :test 'eq)) (assert-equal '(b b a) (set-difference '(a b b c) '(c d e) :test #'eq)) - (assert-equal '(a b b) + (assert-equal '(b b a) (set-difference '(a b b c) '(c d e f g h) :test #'eq))))
(define-test set-diff.hash-equal @@ -40,7 +40,7 @@ (set-difference '("a" "b" "b" "c") '("c" "d" "e") :test 'equal)) - (assert-equal '("a" "b" "b") + (assert-equal '("b" "b" "a") (set-difference '("a" "b" "b" "c") '("c" "d" "e" "f" "g" "h") :test 'equal)) @@ -48,7 +48,7 @@ (set-difference '("a" "b" "b" "c") '("c" "d" "e") :test #'equal)) - (assert-equal '("a" "b" "b") + (assert-equal '("b" "b" "a") (set-difference '("a" "b" "b" "c") '("c" "d" "e" "f" "g" "h") :test #'equal)))) @@ -60,7 +60,7 @@ (set-difference '("a" "b" "b" "c") '("C" "d" "e") :test 'equalp)) - (assert-equal '("a" "b" "b") + (assert-equal '("b" "b" "a") (set-difference '("a" "b" "b" "C") '("c" "D" "e" "f" "g" "h") :test 'equalp)) @@ -68,7 +68,7 @@ (set-difference '("a" "b" "b" "c") '("C" "d" "e") :test #'equalp)) - (assert-equal '("a" "b" "b") + (assert-equal '("b" "b" "a") (set-difference '("a" "b" "b" "C") '("c" "D" "e" "f" "g" "h") :test #'equalp))))
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/12f6ff0e193bbe277e9d4277...