aboutsummaryrefslogtreecommitdiff
path: root/tests/logic.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/logic.lisp')
-rw-r--r--tests/logic.lisp27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/logic.lisp b/tests/logic.lisp
new file mode 100644
index 0000000..5d086de
--- /dev/null
+++ b/tests/logic.lisp
@@ -0,0 +1,27 @@
+(assert (and #t))
+(assert (and #t #t))
+(assert (and #t #t #t))
+(assert (not (and #t #f #t)))
+(assert (not (and #f #t #t)))
+(assert (not (and #f #t #t)))
+(assert (not (or #f)))
+(assert (not (or #f #f)))
+(assert (not (or #f #f #f)))
+(assert (or #t #f #f))
+(assert (or #f #t #f))
+(assert (or #t #t #f))
+
+(let ((t #f))
+ (or #t
+ (setq t #t))
+ (assert (not t)))
+
+(let ((t #f))
+ (and #t
+ (setq t #t))
+ (assert t))
+
+(let ((t #t))
+ (and (setq t #f)
+ (setq t #t))
+ (assert (not t)))