mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-22 19:44:10 +02:00
Merge branch 'master' into boehm-demers-weiser-gc
This commit is contained in:
commit
b66a552487
13 changed files with 182 additions and 79 deletions
|
@ -1059,6 +1059,11 @@
|
|||
(expect-fail "documented?"
|
||||
(documented? gcd))
|
||||
|
||||
(with-test-prefix "(n)"
|
||||
|
||||
(pass-if "n = -2"
|
||||
(eqv? 2 (gcd -2))))
|
||||
|
||||
(with-test-prefix "(0 n)"
|
||||
|
||||
(pass-if "n = 0"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;;;; strings.test --- test suite for Guile's string functions -*- scheme -*-
|
||||
;;;; Jim Blandy <jimb@red-bean.com> --- August 1999
|
||||
;;;;
|
||||
;;;; Copyright (C) 1999, 2001, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 1999, 2001, 2004, 2005, 2006, 2008 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; 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
|
||||
|
@ -168,7 +168,11 @@
|
|||
|
||||
(pass-if-exception "read-only string"
|
||||
exception:read-only-string
|
||||
(string-set! (substring/read-only "abc" 0) 1 #\space)))
|
||||
(string-set! (substring/read-only "abc" 0) 1 #\space))
|
||||
|
||||
(pass-if-exception "literal string"
|
||||
exception:read-only-string
|
||||
(string-set! "an immutable string" 0 #\a)))
|
||||
|
||||
(with-test-prefix "string-split"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;;; symbols.test --- test suite for Guile's symbols -*- scheme -*-
|
||||
;;;;
|
||||
;;;; Copyright (C) 2001, 2006 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 2001, 2006, 2008 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; 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
|
||||
|
@ -17,17 +17,17 @@
|
|||
;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
;;;; Boston, MA 02110-1301 USA
|
||||
|
||||
(use-modules (ice-9 documentation))
|
||||
(define-module (test-suite test-symbols)
|
||||
#:use-module (test-suite lib)
|
||||
#:use-module (ice-9 documentation))
|
||||
|
||||
|
||||
;;;
|
||||
;;; miscellaneous
|
||||
;;;
|
||||
|
||||
;; FIXME: As soon as guile supports immutable strings, this has to be
|
||||
;; replaced with the appropriate error type and message.
|
||||
(define exception:immutable-string
|
||||
(cons 'some-error-type "^trying to modify an immutable string"))
|
||||
(cons 'misc-error "^string is read-only"))
|
||||
|
||||
(define (documented? object)
|
||||
(not (not (object-documentation object))))
|
||||
|
@ -55,7 +55,7 @@
|
|||
|
||||
(with-test-prefix "symbol->string"
|
||||
|
||||
(expect-fail-exception "result is an immutable string"
|
||||
(pass-if-exception "result is an immutable string"
|
||||
exception:immutable-string
|
||||
(string-set! (symbol->string 'abc) 1 #\space)))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue