1
0
mirror of synced 2026-05-05 07:34:31 +00:00
Files
Interlisp.medley/internal/test/LANGUAGE/AUTO/10-3-KEYWORDP.TEST

43 lines
1007 B
Plaintext

;; Function To Be Tested: keywordp
;;
;; Source: CLtL p. 170
;;
;; Chapter 10: Symbols Section 3: Creating Symbols
;;
;; Created By: Peter Reidy
;;
;; Creation Date: 12 July 86
;;
;; Last Update: 26 August 86
;;
;; Filed As: {eris}<lispcore>cml>test>10-3-keywordp.test
;;
;; Syntax: keywordp object
;;
;; Function Description: returns T iff the argument is a symbol and the symbol belongs to the keyword package.
;;
;; Argument(s): object - any lisp object.
;;
;; Returns: T or nil
;;
(do-test-group (keywordp-group
:before
(test-setq *package* *package*)
) ; keywordp-group
(do-test "keyword is any symbol starting with a colon"
(keywordp :nothing)
)
(do-test "all keywords are in the keyword package"
(equal (symbol-package :nothing) (find-package 'keyword))
)
(do-test "A keyword is its own value"
(and
(keywordp ':nothing)
(eq :nothing ':nothing)
(equal (symbol-package ':nothing) (symbol-package :nothing))
)
)
)
STOP