symbol-name.lsp 614 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
;-*- Mode:     Lisp -*-
;;;; Author:   Paul Dietz
;;;; Created:  Sat Jun 14 05:45:55 2003
;;;; Contains: Tests of SYMBOL-NAME

(in-package :cl-test)

(deftest symbol-name.1
  (symbol-name '|ABCD|)
  "ABCD")

(deftest symbol-name.2
  (symbol-name '|1234abcdABCD|)
  "1234abcdABCD")

(deftest symbol-name.3
  (symbol-name :|abcdefg|)
  "abcdefg")

20 21
;;; Error tests

22
(deftest symbol-name.error.1
23 24
  (signals-error (symbol-name) program-error)
  t)
25 26

(deftest symbol-name.error.2
27 28
  (signals-error (symbol-name 'a 'b) program-error)
  t)
29

30
(deftest symbol-name.error.3
31
  (check-type-error #'symbol-name #'symbolp)
32 33 34
  nil)