~ubuntu-branches/ubuntu/quantal/gclcvs/quantal

« back to all changes in this revision

Viewing changes to ansi-tests/compiled-function-p.lsp

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2004-06-24 15:13:46 UTC
  • Revision ID: james.westby@ubuntu.com-20040624151346-xh0xaaktyyp7aorc
Tags: 2.7.0-26
C_GC_OFFSET is 2 on m68k-linux

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
;-*- Mode:     Lisp -*-
 
2
;;;; Author:   Paul Dietz
 
3
;;;; Created:  Mon Jan 13 16:32:44 2003
 
4
;;;; Contains: Tests of COMPILED-FUNCTION-P
 
5
 
 
6
(in-package :cl-test)
 
7
 
 
8
(deftest compiled-function-p.1
 
9
  (some #'(lambda (obj)
 
10
             (if (check-values (compiled-function-p obj))
 
11
                 (not (typep obj 'compiled-function))
 
12
               (typep obj 'compiled-function)))
 
13
         *universe*)
 
14
  nil)
 
15
 
 
16
(deftest compiled-function-p.2
 
17
  (compiled-function-p '(lambda (x y) (cons y x)))
 
18
  nil)
 
19
 
 
20
(deftest compiled-function-p.3
 
21
  (notnot-mv (compiled-function-p (compile nil '(lambda (y x) (cons x y)))))
 
22
  t)
 
23
 
 
24
(deftest compiled-function-p.order.1
 
25
  (let ((i 0))
 
26
    (values
 
27
     (compiled-function-p (progn (incf i) '(lambda () nil)))
 
28
     i))
 
29
  nil 1)
 
30
 
 
31
(deftest compiled-function-p.error.1
 
32
  (signals-error (compiled-function-p) program-error)
 
33
  t)
 
34
 
 
35
(deftest compiled-function-p.error.2
 
36
  (signals-error (compiled-function-p nil nil) program-error)
 
37
  t)