fixed small regression in test-simulator

This commit is contained in:
Danny Yoo 2011-03-09 18:16:25 -05:00
parent 5d691899dd
commit a3cf629321

View File

@ -11,10 +11,13 @@
[(_ actual exp) [(_ actual exp)
(with-syntax ([stx stx]) (with-syntax ([stx stx])
(syntax/loc #'stx (syntax/loc #'stx
(let ([results actual]) (begin
(unless (equal? actual exp) (printf "Running ~s ..." (syntax->datum #'stx))
(raise-syntax-error #f (format "Expected ~s, got ~s" exp results) (let ([results actual])
#'stx)))))])) (unless (equal? actual exp)
(raise-syntax-error #f (format "Expected ~s, got ~s" exp results)
#'stx)))
(printf "ok\n\n"))))]))
;; take n steps in evaluating the machine. ;; take n steps in evaluating the machine.
@ -416,7 +419,8 @@
,(make-PushEnvironment 2) ,(make-PushEnvironment 2)
,(make-AssignImmediateStatement (make-EnvLexicalReference 0) (make-Const 126389)) ,(make-AssignImmediateStatement (make-EnvLexicalReference 0) (make-Const 126389))
,(make-AssignImmediateStatement (make-EnvLexicalReference 1) (make-Const 42)) ,(make-AssignImmediateStatement (make-EnvLexicalReference 1) (make-Const 42))
,(make-AssignPrimOpStatement 'val (make-ApplyPrimitiveProcedure 2))))]) ,(make-AssignPrimOpStatement 'val (make-ApplyPrimitiveProcedure 2 'after))
after))])
(test (machine-val (run m)) (test (machine-val (run m))
(+ 126389 42)) (+ 126389 42))