1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-12 06:41:13 +02:00

Make `weaks.test' slightly more robust.

* test-suite/tests/weaks.test (global-weak): Use `string-copy' on all
  the keys, in case one of them is retained in `scm_source_whash' or
  similar.
This commit is contained in:
Ludovic Courtès 2009-09-28 23:27:53 +02:00
parent e0f6513511
commit 43b03fbbdc

View file

@ -1,5 +1,5 @@
;;;; weaks.test --- tests guile's weaks -*- scheme -*- ;;;; weaks.test --- tests guile's weaks -*- scheme -*-
;;;; Copyright (C) 1999, 2001, 2003, 2006 Free Software Foundation, Inc. ;;;; Copyright (C) 1999, 2001, 2003, 2006, 2009 Free Software Foundation, Inc.
;;;; ;;;;
;;;; This library is free software; you can redistribute it and/or ;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public ;;;; modify it under the terms of the GNU Lesser General Public
@ -95,11 +95,11 @@
(define global-weak (make-weak-vector 10 #f)) (define global-weak (make-weak-vector 10 #f))
(begin (begin
(vector-set! global-weak 0 "string") (vector-set! global-weak 0 (string-copy "string"))
(vector-set! global-weak 1 "beans") (vector-set! global-weak 1 (string-copy "beans"))
(vector-set! global-weak 2 "to") (vector-set! global-weak 2 (string-copy "to"))
(vector-set! global-weak 3 "utah") (vector-set! global-weak 3 (string-copy "utah"))
(vector-set! global-weak 4 "yum yum") (vector-set! global-weak 4 (string-copy "yum yum"))
(gc)) (gc))
;;; Normal weak vectors ;;; Normal weak vectors