summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2010-03-03 00:36:41 +0100
committerLudovic Courtès <ludo@gnu.org>2010-03-03 00:36:41 +0100
commit3278efd3fa3fc106da5c5b704b26f35e5ec16ac4 (patch)
tree82f6c7a8fad5be8b1d7c21e33b7d00fe77107810
parentb8ed3de36e56bff0ffab2000b9ba55c585a4bc0e (diff)
downloadguile-3278efd3fa3fc106da5c5b704b26f35e5ec16ac4.tar.gz
Add test checking whether fluids are GC'd.
* test-suite/tests/fluids.test ("fluids are GC'd"): New test.
-rw-r--r--test-suite/tests/fluids.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/test-suite/tests/fluids.test b/test-suite/tests/fluids.test
index f00fdc480..51353fa47 100644
--- a/test-suite/tests/fluids.test
+++ b/test-suite/tests/fluids.test
@@ -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))))