1 ;;;; procprop.test --- Procedure properties -*- Scheme -*-
2 ;;;; Ludovic Courtès <ludo@gnu.org>
4 ;;;; Copyright (C) 2009 Free Software Foundation, Inc.
6 ;;;; This program is free software; you can redistribute it and/or modify
7 ;;;; it under the terms of the GNU General Public License as published by
8 ;;;; the Free Software Foundation; either version 2, or (at your option)
9 ;;;; any later version.
11 ;;;; This program is distributed in the hope that it will be useful,
12 ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;;; GNU General Public License for more details.
16 ;;;; You should have received a copy of the GNU General Public License
17 ;;;; along with this software; see the file COPYING. If not, write to
18 ;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 ;;;; Boston, MA 02110-1301 USA
21 (define-module (test-procpop)
22 :use-module (test-suite lib))
25 (with-test-prefix "procedure-name"
26 (pass-if "simple subr"
27 (eq? 'display (procedure-name display)))
30 (eq? 'hashq-ref (procedure-name hashq-ref))))
33 (with-test-prefix "procedure-arity"
34 (pass-if "simple subr"
35 (equal? (procedure-property display 'arity)
39 (equal? (procedure-property hashq-ref 'arity)
42 (pass-if "port-closed?"
43 (equal? (procedure-property port-closed? 'arity)
47 (equal? (if ((@ (system vm program) program?) apply)
49 (procedure-property apply 'arity))
53 (equal? (procedure-property cons* 'arity)
57 (equal? (procedure-property list 'arity)