mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-23 21:10:29 +02:00
* tests/numbers.test, tests/list.test: Updated for new
documentation module.
This commit is contained in:
parent
c47e8cc1fd
commit
cb18f2a892
2 changed files with 11 additions and 20 deletions
|
@ -40,7 +40,7 @@
|
||||||
;;;; whether to permit this exception to apply to your modifications.
|
;;;; whether to permit this exception to apply to your modifications.
|
||||||
;;;; If you do not wish that, delete this exception notice.
|
;;;; If you do not wish that, delete this exception notice.
|
||||||
|
|
||||||
(use-modules (ice-9 doc))
|
(use-modules (ice-9 documentation))
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
|
@ -163,12 +163,7 @@
|
||||||
|
|
||||||
;; Is documentation available?
|
;; Is documentation available?
|
||||||
|
|
||||||
(pass-if "documented?"
|
(pass-if "documented?" (object-documentation append!))
|
||||||
(let ((documented #f))
|
|
||||||
(with-output-to-string
|
|
||||||
(lambda ()
|
|
||||||
(set! documented (documentation 'append!))))
|
|
||||||
documented))
|
|
||||||
|
|
||||||
;; Is the handling of empty lists as arguments correct?
|
;; Is the handling of empty lists as arguments correct?
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
;;;; whether to permit this exception to apply to your modifications.
|
;;;; whether to permit this exception to apply to your modifications.
|
||||||
;;;; If you do not wish that, delete this exception notice.
|
;;;; If you do not wish that, delete this exception notice.
|
||||||
|
|
||||||
(use-modules (ice-9 doc))
|
(use-modules (ice-9 documentation))
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
|
@ -48,12 +48,8 @@
|
||||||
;;;
|
;;;
|
||||||
|
|
||||||
|
|
||||||
(define (documented? identifier)
|
(define (documented? object)
|
||||||
(let ((documented #f))
|
(object-documentation object))
|
||||||
(with-output-to-string
|
|
||||||
(lambda ()
|
|
||||||
(set! documented (documentation identifier))))
|
|
||||||
documented))
|
|
||||||
|
|
||||||
|
|
||||||
(define (make-test-name . args)
|
(define (make-test-name . args)
|
||||||
|
@ -93,7 +89,7 @@
|
||||||
;; Is documentation available?
|
;; Is documentation available?
|
||||||
|
|
||||||
(pass-if "documented?"
|
(pass-if "documented?"
|
||||||
(documented? 'exact?))
|
(documented? exact?))
|
||||||
|
|
||||||
;; Special case: 0
|
;; Special case: 0
|
||||||
|
|
||||||
|
@ -148,7 +144,7 @@
|
||||||
;; Is documentation available?
|
;; Is documentation available?
|
||||||
|
|
||||||
(expect-fail "documented?"
|
(expect-fail "documented?"
|
||||||
(documented? 'quotient))
|
(documented? quotient))
|
||||||
|
|
||||||
;; Special case: 0 / n
|
;; Special case: 0 / n
|
||||||
|
|
||||||
|
@ -267,7 +263,7 @@
|
||||||
;; Is documentation available?
|
;; Is documentation available?
|
||||||
|
|
||||||
(expect-fail "documented?"
|
(expect-fail "documented?"
|
||||||
(documented? 'remainder))
|
(documented? remainder))
|
||||||
|
|
||||||
;; Special case: 0 / n
|
;; Special case: 0 / n
|
||||||
|
|
||||||
|
@ -386,7 +382,7 @@
|
||||||
;; Is documentation available?
|
;; Is documentation available?
|
||||||
|
|
||||||
(expect-fail "documented?"
|
(expect-fail "documented?"
|
||||||
(documented? 'modulo))
|
(documented? modulo))
|
||||||
|
|
||||||
;; Special case: 0 % n
|
;; Special case: 0 % n
|
||||||
|
|
||||||
|
@ -517,7 +513,7 @@
|
||||||
;; Is documentation available?
|
;; Is documentation available?
|
||||||
|
|
||||||
(expect-fail "documented?"
|
(expect-fail "documented?"
|
||||||
(documented? 'gcd))
|
(documented? gcd))
|
||||||
|
|
||||||
;; Special case: gcd 0 n
|
;; Special case: gcd 0 n
|
||||||
|
|
||||||
|
@ -668,7 +664,7 @@
|
||||||
;; Is documentation available?
|
;; Is documentation available?
|
||||||
|
|
||||||
(expect-fail "documented?"
|
(expect-fail "documented?"
|
||||||
(documented? '<))
|
(documented? <))
|
||||||
|
|
||||||
;; Special case: 0 < n
|
;; Special case: 0 < n
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue