mirror of
https://github.com/teo3300/rust-mal.git
synced 2026-01-12 01:05:32 +01:00
Adding some info functions and tests
This commit is contained in:
6
tests/atoms.mal
Normal file
6
tests/atoms.mal
Normal file
@ -0,0 +1,6 @@
|
||||
; atom?
|
||||
(assert (atom? (atom 1)))
|
||||
(assert (not (atom? 1)))
|
||||
|
||||
; deref
|
||||
(assert-eq (deref (atom 1)) 1)
|
||||
@ -31,7 +31,6 @@
|
||||
|
||||
(assert-eq (do) nil)
|
||||
|
||||
(println :ififififififififif)
|
||||
; if
|
||||
(assert (if true 1))
|
||||
(assert (not (if false 1)))
|
||||
|
||||
@ -5,5 +5,5 @@
|
||||
; empty?
|
||||
(assert (empty? ()))
|
||||
(assert (empty? (list)))
|
||||
(assert (not (empty? ())))
|
||||
(assert (not (empty? (list (1 2 3)))))
|
||||
(assert (not (empty? '(1 2 3))))
|
||||
(assert (not (empty? (list 1 2 3))))
|
||||
|
||||
Reference in New Issue
Block a user