17 lines
No EOL
339 B
Text
17 lines
No EOL
339 B
Text
(namespace assert
|
|
(defmacro ok! [] (if (bool.and $%&)
|
|
:true
|
|
(throw! "assertion failed")))
|
|
|
|
(defmacro not! [] (if (bool.and $%&)
|
|
(throw! "assertion failed")
|
|
:true))
|
|
|
|
(defmacro eq! [] (if-eq $(%&)
|
|
:true
|
|
(throw! "assertion failed")))
|
|
|
|
(defmacro nq! [] (if-eq $(%&)
|
|
(throw! "assertion failed")
|
|
:true))
|
|
) |