mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 20:00:19 +02:00
* tests/elisp.test: Use module (ice-9 weak-vector).
* tests/weaks.test: Use module (ice-9 weak-vector).
This commit is contained in:
parent
0296763627
commit
cbbeea6603
3 changed files with 24 additions and 14 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
|
||||||
|
|
||||||
|
* tests/elisp.test: Use module (ice-9 weak-vector).
|
||||||
|
|
||||||
|
* tests/weaks.test: Use module (ice-9 weak-vector).
|
||||||
|
|
||||||
2002-12-08 Rob Browning <rlb@defaultvalue.org>
|
2002-12-08 Rob Browning <rlb@defaultvalue.org>
|
||||||
|
|
||||||
* tests/version.test: test (effective-version).
|
* tests/version.test: test (effective-version).
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
;;;; elisp.test --- tests guile's elisp support -*- scheme -*-
|
;;;; elisp.test --- tests guile's elisp support -*- scheme -*-
|
||||||
;;;; Copyright (C) 2002 Free Software Foundation, Inc.
|
;;;; Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
||||||
;;;;
|
;;;;
|
||||||
;;;; This program is free software; you can redistribute it and/or modify
|
;;;; This program is free software; you can redistribute it and/or modify
|
||||||
;;;; it under the terms of the GNU General Public License as published by
|
;;;; it under the terms of the GNU General Public License as published by
|
||||||
|
@ -44,6 +44,8 @@
|
||||||
;;; elisp
|
;;; elisp
|
||||||
;;;
|
;;;
|
||||||
|
|
||||||
|
(use-modules (ice-9 weak-vector))
|
||||||
|
|
||||||
(if (defined? '%nil)
|
(if (defined? '%nil)
|
||||||
|
|
||||||
(with-test-prefix "scheme"
|
(with-test-prefix "scheme"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
;;;; weaks.test --- tests guile's weaks -*- scheme -*-
|
;;;; weaks.test --- tests guile's weaks -*- scheme -*-
|
||||||
;;;; Copyright (C) 1999, 2001 Free Software Foundation, Inc.
|
;;;; Copyright (C) 1999, 2001, 2003 Free Software Foundation, Inc.
|
||||||
;;;;
|
;;;;
|
||||||
;;;; This program is free software; you can redistribute it and/or modify
|
;;;; This program is free software; you can redistribute it and/or modify
|
||||||
;;;; it under the terms of the GNU General Public License as published by
|
;;;; it under the terms of the GNU General Public License as published by
|
||||||
|
@ -58,6 +58,8 @@
|
||||||
;;; other reasons why they might not work as tested here, so if you
|
;;; other reasons why they might not work as tested here, so if you
|
||||||
;;; haven't done anything to weaks, don't sweat it :)
|
;;; haven't done anything to weaks, don't sweat it :)
|
||||||
|
|
||||||
|
(use-modules (ice-9 weak-vector))
|
||||||
|
|
||||||
;;; Creation functions
|
;;; Creation functions
|
||||||
|
|
||||||
|
|
||||||
|
@ -86,28 +88,28 @@
|
||||||
exception:wrong-type-arg
|
exception:wrong-type-arg
|
||||||
(list->weak-vector 32)))
|
(list->weak-vector 32)))
|
||||||
|
|
||||||
(with-test-prefix "make-weak-key-hash-table"
|
(with-test-prefix "make-weak-key-alist-vector"
|
||||||
(pass-if "create"
|
(pass-if "create"
|
||||||
(make-weak-key-hash-table 17)
|
(make-weak-key-alist-vector 17)
|
||||||
#t)
|
#t)
|
||||||
(pass-if-exception "bad-args"
|
(pass-if-exception "bad-args"
|
||||||
exception:wrong-type-arg
|
exception:wrong-type-arg
|
||||||
(make-weak-key-hash-table '(bad arg))))
|
(make-weak-key-alist-vector '(bad arg))))
|
||||||
(with-test-prefix "make-weak-value-hash-table"
|
(with-test-prefix "make-weak-value-alist-vector"
|
||||||
(pass-if "create"
|
(pass-if "create"
|
||||||
(make-weak-value-hash-table 17)
|
(make-weak-value-alist-vector 17)
|
||||||
#t)
|
#t)
|
||||||
(pass-if-exception "bad-args"
|
(pass-if-exception "bad-args"
|
||||||
exception:wrong-type-arg
|
exception:wrong-type-arg
|
||||||
(make-weak-value-hash-table '(bad arg))))
|
(make-weak-value-alist-vector '(bad arg))))
|
||||||
|
|
||||||
(with-test-prefix "make-doubly-weak-hash-table"
|
(with-test-prefix "make-doubly-weak-alist-vector"
|
||||||
(pass-if "create"
|
(pass-if "create"
|
||||||
(make-doubly-weak-hash-table 17)
|
(make-doubly-weak-alist-vector 17)
|
||||||
#t)
|
#t)
|
||||||
(pass-if-exception "bad-args"
|
(pass-if-exception "bad-args"
|
||||||
exception:wrong-type-arg
|
exception:wrong-type-arg
|
||||||
(make-doubly-weak-hash-table '(bad arg)))))
|
(make-doubly-weak-alist-vector '(bad arg)))))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -143,9 +145,9 @@
|
||||||
(not (vector-ref global-weak 3))
|
(not (vector-ref global-weak 3))
|
||||||
(not (vector-ref global-weak 4)))))))
|
(not (vector-ref global-weak 4)))))))
|
||||||
|
|
||||||
(let ((x (make-weak-key-hash-table 17))
|
(let ((x (make-weak-key-alist-vector 17))
|
||||||
(y (make-weak-value-hash-table 17))
|
(y (make-weak-value-alist-vector 17))
|
||||||
(z (make-doubly-weak-hash-table 17))
|
(z (make-doubly-weak-alist-vector 17))
|
||||||
(test-key "foo")
|
(test-key "foo")
|
||||||
(test-value "bar"))
|
(test-value "bar"))
|
||||||
(with-test-prefix
|
(with-test-prefix
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue