Files
rust-mal/tests/logic.mal
2024-01-17 20:58:25 +09:00

27 lines
431 B
Plaintext

; positive assert
(assert true)
(assert ())
(assert 1)
; not
(assert (not false))
(assert (not nil))
(assert (not (not true)))
; 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)))