2024-08-27 21:31:13 +00:00
|
|
|
;; -*- mode: lisp; -*-
|
|
|
|
|
|
|
|
(assert (= (not true) false))
|
|
|
|
(assert (= (not false) true))
|
|
|
|
|
|
|
|
(assert (and true))
|
|
|
|
(assert (= (and false) false))
|
|
|
|
(assert (and true true))
|
|
|
|
(assert (= (and true false) false))
|
|
|
|
(assert (= (and false true) false))
|
|
|
|
|
|
|
|
(assert (and true))
|
|
|
|
(assert (= (or false) false))
|
|
|
|
(assert (or true true))
|
|
|
|
(assert (or true false))
|
|
|
|
(assert (or false true))
|
|
|
|
(assert (= (or false false) false))
|
|
|
|
|
|
|
|
;; "and" is short-circuiting and should stop evaluation on first "false"
|
|
|
|
(assert (= (and false (/ 1 0)) false))
|
|
|
|
|
2024-08-27 22:20:01 +00:00
|
|
|
;; "or" is short-circuiting and should stop evaluation on first "true"
|
2024-08-27 21:31:13 +00:00
|
|
|
(assert (or true (/ 1 0)))
|