diff options
author | Ludovic Courtès <ludo@gnu.org> | 2010-03-03 00:36:41 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2010-03-03 00:36:41 +0100 |
commit | 3278efd3fa3fc106da5c5b704b26f35e5ec16ac4 (patch) | |
tree | 82f6c7a8fad5be8b1d7c21e33b7d00fe77107810 | |
parent | b8ed3de36e56bff0ffab2000b9ba55c585a4bc0e (diff) | |
download | guile-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.test | 12 |
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)))) |