Forked from
ansi-test / ansi-test
2107 commits behind the upstream repository.
-
pfdietz authored
Many cleanups. Replaced notnot, not with notnot-mv, not-mv in places where we can inspect the results for the right number of multiple values. Ditto for multiple-value-bind*, which is strict in checking for number of values. Indentation changes.
pfdietz authoredMany cleanups. Replaced notnot, not with notnot-mv, not-mv in places where we can inspect the results for the right number of multiple values. Ditto for multiple-value-bind*, which is strict in checking for number of values. Indentation changes.
complement.lsp 839 B
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Sun Oct 6 20:04:33 2002
;;;; Contains: Tests for COMPLEMENT
(in-package :cl-test)
(deftest complement.1
(notnot-mv (funcall (complement #'identity) nil))
t)
(deftest complement.2
(funcall (complement #'identity) t)
nil)
(deftest complement.3
(every #'(lambda (x) (eql (funcall (cl::complement #'not) x)
(not (not x))))
*universe*)
t)
(deftest complement.4
(let ((x '(#\b)))
(loop for i from 2 to (min 256 (1- call-arguments-limit))
always (progn
(push #\a x)
(apply (complement #'char=) x))))
t)
(deftest complement.5
(notnot-mv (complement #'identity))
t)
(deftest complement.error.1
(classify-error (complement))
program-error)
(deftest complement.error.2
(classify-error (complement #'not t))
program-error)