source: trunk/source/tests/ansi-tests/function-lambda-expression.lsp @ 8991

Last change on this file since 8991 was 8991, checked in by gz, 11 years ago

Check in the gcl ansi test suite (original, in preparation for making local changes)

File size: 1.1 KB
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Mon Jan 13 16:27:12 2003
4;;;; Contains: Tests for FUNCTION-LAMBDA-EXPRESSION
5
6(in-package :cl-test)
7
8(deftest function-lambda-expression.1
9  (length
10   (multiple-value-list
11    (function-lambda-expression #'cons)))
12  3)
13
14(deftest function-lambda-expression.2
15  (let ((x nil))
16    (flet ((%f () x))
17      (let ((ret-vals
18             (multiple-value-list
19              (function-lambda-expression #'%f))))
20        (values (length ret-vals)
21                (notnot (second ret-vals))))))
22  3 t)
23
24;;; Verify that it doesn't barf on generic functions
25(deftest function-lambda-expression.3
26  (length
27   (multiple-value-list
28    (function-lambda-expression
29     #'meaningless-user-generic-function-for-universe)))
30  3)
31
32(deftest function-lambda-expression.order.1
33  (let ((i 0))
34    (function-lambda-expression (progn (incf i) #'cons))
35    i)
36  1)
37
38(deftest function-lambda-expression.error.1
39  (signals-error (function-lambda-expression) program-error)
40  t)
41
42(deftest function-lambda-expression.error.2
43  (signals-error (function-lambda-expression #'cons nil) program-error)
44  t)
Note: See TracBrowser for help on using the repository browser.