split up test.run function: allow for multiple test functions
This commit is contained in:
parent
310837ab58
commit
6f93968e4b
3 changed files with 9 additions and 6 deletions
|
@ -4,8 +4,7 @@
|
|||
|
||||
(defpackage :scopes/forge
|
||||
(:use :common-lisp)
|
||||
(:export #:new-forge-env #:data-stack #:exec
|
||||
#:add))
|
||||
(:export #:new-forge-env #:data-stack #:exec))
|
||||
|
||||
(in-package :scopes/forge)
|
||||
|
||||
|
|
|
@ -13,8 +13,11 @@
|
|||
(defun run ()
|
||||
(let ((fe (scf:new-forge-env))
|
||||
(tst (sct:test-suite)))
|
||||
(test-exec tst fe)
|
||||
;(format t "~%fe ~a" fe)
|
||||
(sct:result tst)))
|
||||
|
||||
(defun test-exec (tst fe)
|
||||
(scf:exec fe '(4 2 add))
|
||||
(sct:assert-eq tst (car (scf:data-stack fe)) 6)
|
||||
;(format t "~%fe ~a" fe)
|
||||
(sct:result tst)
|
||||
))
|
||||
(sct:assert-eq tst (car (scf:data-stack fe)) 6))
|
||||
|
||||
|
|
|
@ -16,3 +16,4 @@
|
|||
|
||||
(defmacro result (tst)
|
||||
`(elt ,tst 0))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue