(define (mark! object)
(let ((value
- (case (hash-table-ref/default table object 'unseen)
- ((unseen) 'seen)
- ((seen) 'shared))))
+ (let ((value (hash-table-ref/default table object 'unseen)))
+ (case value
+ ((unseen) 'seen)
+ ((seen shared) 'shared)
+ (else (error "Invalid sharing state:" value))))))
(hash-table-set! table object value)
(eq? 'seen value)))
(set-car! c c)
(set-cdr! c c)
(let ((s (find-shared-objects c)))
- (expect-failure
- (lambda ()
- (assert-= (length s) 1)
- (assert-eq (car s) c)))))))
+ (assert-= (length s) 1)
+ (assert-eq (car s) c)))))