source: trunk/source/tests/ansi-tests/standard-generic-function.lsp @ 8991

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

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

File size: 864 bytes
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Tue May 20 06:47:20 2003
4;;;; Contains: Additional tests for class STANDARD-GENERIC-FUNCTION
5
6(in-package :cl-test)
7
8;;; Most tests of this are elsewhere
9
10(unless (typep #'cons 'generic-function)
11
12(deftest standard-generic-function.1
13  (progn
14    (eval
15     '(defgeneric sgf-cpl-gf.1 (x)
16        (:method ((x generic-function)) 1)
17        (:method ((x function)) 2)
18        (:method ((x t)) 3)))
19    (values
20     (sgf-cpl-gf.1 #'make-instance)
21     (sgf-cpl-gf.1 #'cons)
22     (sgf-cpl-gf.1 'a)))
23  1 2 3)
24
25(deftest standard-generic-function.2
26  (progn
27    (eval
28     '(defgeneric sgf-cpl-gf.2 (x)
29        (:method ((x standard-generic-function)) 1)
30        (:method ((x function)) 2)
31        (:method ((x t)) 3)))
32    (values
33     (sgf-cpl-gf.2 #'make-instance)
34     (sgf-cpl-gf.2 #'cons)
35     (sgf-cpl-gf.2 'a)))
36  1 2 3)
37
38
39)
40
41
42
43
44     
45 
Note: See TracBrowser for help on using the repository browser.