Convert test-rint to rackunit
This commit is contained in:
parent
f7a20171ec
commit
a4dd0ded8f
|
|
@ -22,4 +22,3 @@
|
|||
(for ([program listings])
|
||||
(test-eq (interp-RVar (list-ref listings 0))
|
||||
(evaluate-bril-main (pass (list-ref listings 0)))))
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
#lang racket
|
||||
|
||||
(provide test-rint-tests)
|
||||
|
||||
(require rackunit)
|
||||
(require "test-util.rkt")
|
||||
(require "rint.rkt")
|
||||
|
||||
|
|
@ -9,7 +12,14 @@
|
|||
(define ast1.1 (Prim '+ (list rd neg-eight)))
|
||||
(define program (Program '() ast1.1))
|
||||
|
||||
(test-eq -5
|
||||
(define test-rint-tests
|
||||
(test-suite
|
||||
"RInt interpretation tests"
|
||||
(test-case
|
||||
"program with input"
|
||||
(check-equal?
|
||||
-5
|
||||
(with-input-from-num-list '(3)
|
||||
(lambda () (interp-RInt program))))
|
||||
(lambda () (interp-RInt program)))))))
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue