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")
(display "If-then exp!\n\tExpect: 6\n\tGotten: ")
(display (* 3 (if #t 2 0)))
(newline)
(test "If expressions exp!"
`(
(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: ")
(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)
(header "R5RS: Testing Eval system")
(display "Eval expression. Expect 6: ")
(display (eval '(* 2 (cdr '(2 . 3))) (scheme-report-environment 5)))