use separate reader and writer functions / methods for data stack and test result
This commit is contained in:
parent
6f93968e4b
commit
9bed7704b6
2 changed files with 11 additions and 5 deletions
|
@ -17,7 +17,10 @@
|
|||
(funcall (find-symbol (symbol-name x) :scopes/forge) fe)
|
||||
(pushd fe x))))
|
||||
|
||||
(defmacro data-stack (fe)
|
||||
(defun data-stack (fe)
|
||||
(elt fe 0))
|
||||
|
||||
(defmacro data-stack! (fe)
|
||||
`(elt ,fe 0))
|
||||
|
||||
; forge primitives
|
||||
|
@ -28,8 +31,8 @@
|
|||
; internal definitions
|
||||
|
||||
(defun popd (fe)
|
||||
(pop (data-stack fe)))
|
||||
(pop (data-stack! fe)))
|
||||
|
||||
(defun pushd (fe v)
|
||||
(push v (data-stack fe)))
|
||||
(push v (data-stack! fe)))
|
||||
|
||||
|
|
|
@ -12,8 +12,11 @@
|
|||
(vector nil))
|
||||
|
||||
(defun assert-eq (tst have wanted)
|
||||
(push (equalp have wanted) (result tst)))
|
||||
(push (equalp have wanted) (result! tst)))
|
||||
|
||||
(defmacro result (tst)
|
||||
(defun result (tst)
|
||||
(elt tst 0))
|
||||
|
||||
(defmacro result! (tst)
|
||||
`(elt ,tst 0))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue