summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2009-09-28 23:27:53 +0200
committerLudovic Courtès <ludo@gnu.org>2009-09-28 23:32:34 +0200
commit43b03fbbdc8d3eddc04daa1a14c5e2eae3ee5a1f (patch)
tree138d72536aee53ef3990d630fcb80454996bf07d
parente0f651351140983ff6a14a4e9aa4a950a9f2d59d (diff)
downloadguile-43b03fbbdc8d3eddc04daa1a14c5e2eae3ee5a1f.tar.gz
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.
-rw-r--r--test-suite/tests/weaks.test12
1 files changed, 6 insertions, 6 deletions
diff --git a/test-suite/tests/weaks.test b/test-suite/tests/weaks.test
index b469887c2..b39d2e78f 100644
--- a/test-suite/tests/weaks.test
+++ b/test-suite/tests/weaks.test
@@ -1,5 +1,5 @@
;;;; 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
;;;; modify it under the terms of the GNU Lesser General Public
@@ -95,11 +95,11 @@
(define global-weak (make-weak-vector 10 #f))
(begin
- (vector-set! global-weak 0 "string")
- (vector-set! global-weak 1 "beans")
- (vector-set! global-weak 2 "to")
- (vector-set! global-weak 3 "utah")
- (vector-set! global-weak 4 "yum yum")
+ (vector-set! global-weak 0 (string-copy "string"))
+ (vector-set! global-weak 1 (string-copy "beans"))
+ (vector-set! global-weak 2 (string-copy "to"))
+ (vector-set! global-weak 3 (string-copy "utah"))
+ (vector-set! global-weak 4 (string-copy "yum yum"))
(gc))
;;; Normal weak vectors