File: atom.lsp

package info (click to toggle)
cl-ansi-tests 20071218-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 7,000 kB
  • ctags: 22,025
  • sloc: lisp: 134,798; makefile: 144
file content (31 lines) | stat: -rw-r--r-- 611 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
;-*- Mode:     Lisp -*-
;;;; Author:   Paul Dietz
;;;; Created:  Sat Apr 19 21:28:09 2003
;;;; Contains: Tests of ATOM

(in-package :cl-test)

; (compile-and-load "cons-aux.lsp")

(deftest atom.1
  (loop for x in *universe*
	unless (if (atom x) (not (consp x)) (consp x))
	collect x)
  nil)

(deftest atom.2
  (macrolet ((%m (z) z)) (atom (expand-in-current-env (%m 0))))
  t)

(deftest atom.order.1
  (let ((i 0))
    (values (atom (progn (incf i) '(a b))) i))
  nil 1)

(deftest atom.error.1
  (signals-error (atom) program-error)
  t)

(deftest atom.error.2
  (signals-error (atom 'a 'b) program-error)
  t)