mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-29 16:30:19 +02:00
Do not fail when the GC does not collect an object, report it as
'unresolved'.
This commit is contained in:
parent
2924541ba0
commit
eb074bfc5a
1 changed files with 8 additions and 6 deletions
|
@ -33,7 +33,8 @@
|
|||
;;; other reasons why they might not work as tested here, so if you
|
||||
;;; haven't done anything to weaks, don't sweat it :)
|
||||
|
||||
(use-modules (ice-9 weak-vector))
|
||||
(use-modules (test-suite lib)
|
||||
(ice-9 weak-vector))
|
||||
|
||||
;;; Creation functions
|
||||
|
||||
|
@ -114,11 +115,12 @@
|
|||
(pass-if "dies"
|
||||
(begin
|
||||
(gc)
|
||||
(or (not (vector-ref global-weak 0))
|
||||
(not (vector-ref global-weak 1))
|
||||
(not (vector-ref global-weak 2))
|
||||
(not (vector-ref global-weak 3))
|
||||
(not (vector-ref global-weak 4)))))))
|
||||
(or (and (not (vector-ref global-weak 0))
|
||||
(not (vector-ref global-weak 1))
|
||||
(not (vector-ref global-weak 2))
|
||||
(not (vector-ref global-weak 3))
|
||||
(not (vector-ref global-weak 4)))
|
||||
(throw 'unresolved))))))
|
||||
|
||||
(let ((x (make-weak-key-alist-vector 17))
|
||||
(y (make-weak-value-alist-vector 17))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue