Browse files

Conditionally mark HASHTABLES.WEAK* tests as expected on SBCL.

SBCL has supported weak hash-tables for a while now. If
SB-EXT:HASH-TABLE-WEAKNESS exists, don't mark the weak hash-table tests
as expected failures.

Fixes gh issue #1, reported by Anton Vodonosov.
  • Loading branch information...
1 parent fae92b7 commit 70717e20c37768bc7473bc1aad597d3cfb49d9c1 @luismbo luismbo committed Jun 14, 2012
Showing with 10 additions and 5 deletions.
  1. +10 −5 tests.lisp
@@ -24,10 +24,18 @@
;;;; Weak Hashtables
-#+(or sbcl corman scl)
+(eval-when (:compile-toplevel :load-toplevel :execute)
+ (defun sbcl-without-weak-hash-tables-p ()
+ (if (and (find :sbcl *features*)
+ (not (find-symbol "HASH-TABLE-WEAKNESS" "SB-EXT")))
+ '(:and)
+ '(:or))))
+#+(or corman scl #.(tg-tests::sbcl-doesnt-support-weak-hash-tables-p))
(pushnew 'hashtables.weak-key.1 rt::*expected-failures*)
- (pushnew 'hashtables.weak-key.2 rt::*expected-failures*))
+ (pushnew 'hashtables.weak-key.2 rt::*expected-failures*)
+ (pushnew 'hashtables.weak-value.1 rt::*expected-failures*))
(deftest hashtables.weak-key.1
(let ((ht (make-weak-hash-table :weakness :key)))
@@ -41,9 +49,6 @@
(hash-table-weakness ht)))
t :key)
-#+(or sbcl corman scl)
-(pushnew 'hashtables.weak-value.1 rt::*expected-failures*)
(deftest hashtables.weak-value.1
(let ((ht (make-weak-hash-table :weakness :value)))
(values (hash-table-p ht)

0 comments on commit 70717e2

Please sign in to comment.