1
0

Converted some more tests to use the new test system.

This commit is contained in:
Jon Michael Aanes 2018-12-28 19:56:28 +01:00
parent 7231ae67c0
commit 380f73683f

View File

@ -239,23 +239,15 @@
(header "R5RS: Test if-expressions") (header "R5RS: Test if-expressions")
(display "If-then exp!\n\tExpect: 6\n\tGotten: ") (test "If expressions exp!"
(display (* 3 (if #t 2 0))) `(
(newline) (6 . ,(* 3 (if #t 2 0)))
(0 . ,(* 3 (if #f 2 0)))
("Hello World" . ,(if #t "Hello World"))
("???" . ,(if #f "Hello World"))
))
(display "If-else exp!\n\tExpect: 0\n\tGotten: ") (header "R5RS: Testing Eval system")
(display (* 3 (if #f 2 0)))
(newline)
(display "If-one-branch exp!\n\tExpect: Hello World\n\tGotten: ")
(if #t (display "Hello World\n"))
(display "If-one-branch exp!\n\tExpect: \n\tGotten: ")
(if #f (display "Hello World\n"))
(newline)
(display "* R5RS: Testing Eval system *")
(newline)
(display "Eval expression. Expect 6: ") (display "Eval expression. Expect 6: ")
(display (eval '(* 2 (cdr '(2 . 3))) (scheme-report-environment 5))) (display (eval '(* 2 (cdr '(2 . 3))) (scheme-report-environment 5)))