Skip to content
Snippets Groups Projects
Commit c9164452 authored by pfdietz's avatar pfdietz
Browse files

Added tests for AND, OR.

parent aafc7ef7
No related branches found
No related tags found
No related merge requests found
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Fri Oct 18 07:23:48 2002
;;;; Contains: Tests for AND
(in-package :cl-test)
(deftest and.1
(and)
t)
(deftest and.2
(and nil)
nil)
(deftest and.3
(and 'a)
a)
(deftest and.4
(and (values 'a 'b 'c))
a b c)
(deftest and.5 (and (values)))
(deftest and.6
(and (values t nil) 'a)
a)
(deftest and.7
(and nil (values 'a 'b 'c))
nil)
(deftest and.8
(let ((x 0))
(values (and nil (incf x))
x))
nil 0)
(deftest and.9
(and (values 1 nil) (values nil 2))
nil 2)
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
;;; Tests of data and control flow ;;; Tests of data and control flow
(load "places.lsp") (load "places.lsp")
(load "and.lsp")
(load "block.lsp") (load "block.lsp")
(load "call-arguments-limit.lsp") (load "call-arguments-limit.lsp")
(load "catch.lsp") (load "catch.lsp")
...@@ -39,6 +41,7 @@ ...@@ -39,6 +41,7 @@
(load "not-and-null.lsp") (load "not-and-null.lsp")
(load "notany.lsp") (load "notany.lsp")
(load "notevery.lsp") (load "notevery.lsp")
(load "or.lsp")
(load "progv.lsp") (load "progv.lsp")
(load "some.lsp") (load "some.lsp")
(load "t.lsp") (load "t.lsp")
......
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Fri Oct 18 07:29:27 2002
;;;; Contains: Tests of OR
(in-package :cl-test)
(deftest or.1
(or)
nil)
(deftest or.2
(or nil)
nil)
(deftest or.3
(or 'a)
a)
(deftest or.4
(or (values 'a 'b 'c))
a b c)
(deftest or.5 (or (values)))
(deftest or.6
(or (values t nil) 'a)
t)
(deftest or.7
(or nil (values 'a 'b 'c))
a b c)
(deftest or.8
(let ((x 0))
(values (or t (incf x))
x))
t 0)
(deftest or.9
(or (values nil 1 2) (values 1 nil 2))
1 nil 2)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment