Files
rust-mal/tests/logic.mal
teo3300 9af7ada706 Removed MalType::Bool
mplemented instead MalType::T as opposed to Maltype::Nil
2025-06-13 18:30:20 +09:00

27 lines
423 B
Plaintext

; positive assert
(assert t)
(assert ())
(assert 1)
; not
(assert (not nil))
(assert (not nil))
(assert (not (not t)))
; or
(assert (not (or nil nil)))
(assert (or 1 nil))
(assert (or nil 1))
(assert (or 1 1))
; and
(assert (not (and nil nil)))
(assert (not (and 1 nil)))
(assert (not (and 1 nil)))
(assert (and 1 1))
; xor
(assert (not (xor nil nil)))
(assert (xor nil 1))
(assert (xor 1 nil))
(assert (not (xor 1 1)))