mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
Add test checking whether fluids are GC'd.
* test-suite/tests/fluids.test ("fluids are GC'd"): New test.
This commit is contained in:
parent
b8ed3de36e
commit
3278efd3fa
1 changed files with 12 additions and 0 deletions
|
@ -55,3 +55,15 @@
|
|||
(a 2))
|
||||
(eqv? (fluid-ref a) 2))
|
||||
(eqv? (fluid-ref a) #f))))
|
||||
|
||||
(pass-if "fluids are GC'd"
|
||||
|
||||
(let ((g (make-guardian)))
|
||||
(g (make-fluid))
|
||||
(let loop ((i 1000))
|
||||
(and (> i 0)
|
||||
(begin
|
||||
(make-fluid)
|
||||
(loop (1- i)))))
|
||||
(gc)
|
||||
(fluid? (g))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue