-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtests-1.6-req.scm
More file actions
41 lines (35 loc) · 804 Bytes
/
tests-1.6-req.scm
File metadata and controls
41 lines (35 loc) · 804 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
(add-tests-with-string-output "let"
[(let ([x 5]) x) => "5\n"]
[(let ([x (fx+ 1 2)]) x) => "3\n"]
[(let ([x (fx+ 1 2)])
(let ([y (fx+ 3 4)])
(fx+ x y)))
=> "10\n"]
[(let ([x (fx+ 1 2)])
(let ([y (fx+ 3 4)])
(fx- y x)))
=> "4\n"]
[(let ([x (fx+ 1 2)]
[y (fx+ 3 4)])
(fx- y x))
=> "4\n"]
[(let ([x (let ([y (fx+ 1 2)]) (fx* y y))])
(fx+ x x))
=> "18\n"]
[(let ([x (fx+ 1 2)])
(let ([x (fx+ 3 4)])
x))
=> "7\n"]
[(let ([x (fx+ 1 2)])
(let ([x (fx+ x 4)])
x))
=> "7\n"]
[(let ([t (let ([t (let ([t (let ([t (fx+ 1 2)]) t)]) t)]) t)]) t)
=> "3\n"]
[(let ([x 12])
(let ([x (fx+ x x)])
(let ([x (fx+ x x)])
(let ([x (fx+ x x)])
(fx+ x x)))))
=> "192\n"]
)