source: project/chicken/branches/prerelease/tests/r4rstest.out @ 9381

Last change on this file since 9381 was 9381, checked in by Ivan Raikov, 12 years ago

Merged trunk into prerelease

File size: 25.9 KB
Line 
1SECTION(2 1)
2SECTION(3 4)
3 #<procedure>
4    #<procedure>
5       #<procedure>
6          #<procedure>
7             #<procedure>
8                #<procedure>
9                   #<procedure>
10                      #<procedure>
11                         #<procedure>
12(#t #f #f #f #f #f #f #f #f)#t
13(#t #f #f #f #f #f #f #f #f)#f
14(#f #t #f #f #f #f #f #f #f)#\a
15(#f #f #t #f #f #f #f #f #f)()
16(#f #f #f #t #f #f #f #f #f)9739
17(#f #f #f #f #t #f #f #f #f)(test)
18(#f #f #f #f #f #t #f #f #f)#<procedure>
19(#f #f #f #f #f #f #t #f #f)"test"
20(#f #f #f #f #f #f #t #f #f)""
21(#f #f #f #f #f #f #f #t #f)test
22(#f #f #f #f #f #f #f #f #t)#()
23(#f #f #f #f #f #f #f #f #t)#(a b c)
24SECTION(4 1 2)
25(quote (quote a))  ==> (quote a)
26(quote (quote a))  ==> (quote a)
27SECTION(4 1 3)
28(#<procedure> 3 4)  ==> 12
29SECTION(4 1 4)
30(#<procedure> 4)  ==> 8
31(#<procedure> 7 10)  ==> 3
32(#<procedure> 6)  ==> 10
33(#<procedure> 3 4 5 6)  ==> (3 4 5 6)
34(#<procedure> 3 4 5 6)  ==> (5 6)
35SECTION(4 1 5)
36(if yes)  ==> yes
37(if no)  ==> no
38(if 1)  ==> 1
39SECTION(4 1 6)
40(define 3)  ==> 3
41(set! 5)  ==> 5
42SECTION(4 2 1)
43(cond greater)  ==> greater
44(cond equal)  ==> equal
45(cond 2)  ==> 2
46(case composite)  ==> composite
47(case consonant)  ==> consonant
48(and #t)  ==> #t
49(and #f)  ==> #f
50(and (f g))  ==> (f g)
51(and #t)  ==> #t
52(or #t)  ==> #t
53(or #t)  ==> #t
54(or #f)  ==> #f
55(or #f)  ==> #f
56(or (b c))  ==> (b c)
57SECTION(4 2 2)
58(let 6)  ==> 6
59(let 35)  ==> 35
60(let* 70)  ==> 70
61(letrec #t)  ==> #t
62(let 5)  ==> 5
63(let 34)  ==> 34
64(let 6)  ==> 6
65(let 34)  ==> 34
66(let* 7)  ==> 7
67(let* 34)  ==> 34
68(let* 8)  ==> 8
69(let* 34)  ==> 34
70(letrec 9)  ==> 9
71(letrec 34)  ==> 34
72(letrec 10)  ==> 10
73(letrec 34)  ==> 34
74SECTION(4 2 3)
75(begin 6)  ==> 6
76SECTION(4 2 4)
77(do #(0 1 2 3 4))  ==> #(0 1 2 3 4)
78(do 25)  ==> 25
79(let 1)  ==> 1
80(let ((6 1 3) (-5 -2)))  ==> ((6 1 3) (-5 -2))
81(let -1)  ==> -1
82SECTION(4 2 6)
83(quasiquote (list 3 4))  ==> (list 3 4)
84(quasiquote (list a (quote a)))  ==> (list a (quote a))
85(quasiquote (a 3 4 5 6 b))  ==> (a 3 4 5 6 b)
86(quasiquote ((foo 7) . cons))  ==> ((foo 7) . cons)
87(quasiquote #(10 5 2 4 3 8))  ==> #(10 5 2 4 3 8)
88(quasiquote 5)  ==> 5
89(quasiquote (a (quasiquote (b (unquote (+ 1 2)) (unquote (foo 4 d)) e)) f))  ==> (a (quasiquote (b (unquote (+ 1 2)) (unquote (foo 4 d)) e)) f)
90(quasiquote (a (quasiquote (b (unquote x) (unquote (quote y)) d)) e))  ==> (a (quasiquote (b (unquote x) (unquote (quote y)) d)) e)
91(quasiquote (list 3 4))  ==> (list 3 4)
92(quasiquote (quasiquote (list (unquote (+ 1 2)) 4)))  ==> (quasiquote (list (unquote (+ 1 2)) 4))
93SECTION(5 2 1)
94(define 6)  ==> 6
95(define 1)  ==> 1
96(#<procedure> 6)  ==> (3 6)
97(#<procedure> 6)  ==> 9
98SECTION(5 2 2)
99(#<procedure>)  ==> 5
100(define 34)  ==> 34
101(#<procedure>)  ==> 5
102(define 34)  ==> 34
103(#<procedure> 88)  ==> 88
104(#<procedure> 4)  ==> 4
105(define 34)  ==> 34
106(internal-define 99)  ==> 99
107(internal-define 77)  ==> 77
108SECTION(6 1)
109(#<procedure> #t)  ==> #f
110(#<procedure> 3)  ==> #f
111(#<procedure> (3))  ==> #f
112(#<procedure> #f)  ==> #t
113(#<procedure> ())  ==> #f
114(#<procedure> ())  ==> #f
115(#<procedure> nil)  ==> #f
116SECTION(6 2)
117(#<procedure> a a)  ==> #t
118(#<procedure> a b)  ==> #f
119(#<procedure> 2 2)  ==> #t
120(#<procedure> () ())  ==> #t
121(#<procedure> 10000 10000)  ==> #t
122(#<procedure> (1 . 2) (1 . 2))  ==> #f
123(#<procedure> #<procedure> #<procedure>)  ==> #f
124(#<procedure> #f nil)  ==> #f
125(#<procedure> #<procedure> #<procedure>)  ==> #t
126(#<procedure> #<procedure> #<procedure>)  ==> #t
127(#<procedure> #<procedure> #<procedure>)  ==> #f
128(#<procedure> #<procedure> #<procedure>)  ==> #f
129(#<procedure> a a)  ==> #t
130(#<procedure> (a) (a))  ==> #f
131(#<procedure> () ())  ==> #t
132(#<procedure> #<procedure> #<procedure>)  ==> #t
133(#<procedure> (a) (a))  ==> #t
134(#<procedure> #() #())  ==> #t
135(#<procedure> #<procedure> #<procedure>)  ==> #t
136(#<procedure> a a)  ==> #t
137(#<procedure> (a) (a))  ==> #t
138(#<procedure> (a (b) c) (a (b) c))  ==> #t
139(#<procedure> "abc" "abc")  ==> #t
140(#<procedure> 2 2)  ==> #t
141(#<procedure> #(a a a a a) #(a a a a a))  ==> #t
142SECTION(6 3)
143(dot (a b c d e))  ==> (a b c d e)
144(#<procedure> (a b c))  ==> #t
145(set-cdr! (a . 4))  ==> (a . 4)
146(#<procedure> (a . 4) (a . 4))  ==> #t
147(dot (a b c . d))  ==> (a b c . d)
148(#<procedure> (a . 4))  ==> #f
149(list? #f)  ==> #f
150(#<procedure> a ())  ==> (a)
151(#<procedure> (a) (b c d))  ==> ((a) b c d)
152(#<procedure> "a" (b c))  ==> ("a" b c)
153(#<procedure> a 3)  ==> (a . 3)
154(#<procedure> (a b) c)  ==> ((a b) . c)
155(#<procedure> (a b c))  ==> a
156(#<procedure> ((a) b c d))  ==> (a)
157(#<procedure> (1 . 2))  ==> 1
158(#<procedure> ((a) b c d))  ==> (b c d)
159(#<procedure> (1 . 2))  ==> 2
160(#<procedure> a 7 c)  ==> (a 7 c)
161(#<procedure>)  ==> ()
162(#<procedure> (a b c))  ==> 3
163(#<procedure> (a (b) (c d e)))  ==> 3
164(#<procedure> ())  ==> 0
165(#<procedure> (x) (y))  ==> (x y)
166(#<procedure> (a) (b c d))  ==> (a b c d)
167(#<procedure> (a (b)) ((c)))  ==> (a (b) (c))
168(#<procedure>)  ==> ()
169(#<procedure> (a b) (c . d))  ==> (a b c . d)
170(#<procedure> () a)  ==> a
171(#<procedure> (a b c))  ==> (c b a)
172(#<procedure> (a (b c) d (e (f))))  ==> ((e (f)) d (b c) a)
173(#<procedure> (a b c d) 2)  ==> c
174(#<procedure> a (a b c))  ==> (a b c)
175(#<procedure> b (a b c))  ==> (b c)
176(#<procedure> a (b c d))  ==> #f
177(#<procedure> (a) (b (a) c))  ==> #f
178(#<procedure> (a) (b (a) c))  ==> ((a) c)
179(#<procedure> 101 (100 101 102))  ==> (101 102)
180(#<procedure> a ((a 1) (b 2) (c 3)))  ==> (a 1)
181(#<procedure> b ((a 1) (b 2) (c 3)))  ==> (b 2)
182(#<procedure> d ((a 1) (b 2) (c 3)))  ==> #f
183(#<procedure> (a) (((a)) ((b)) ((c))))  ==> #f
184(#<procedure> (a) (((a)) ((b)) ((c))))  ==> ((a))
185(#<procedure> 5 ((2 3) (5 7) (11 13)))  ==> (5 7)
186SECTION(6 4)
187(#<procedure> a)  ==> #t
188(standard-case #t)  ==> #t
189(standard-case #t)  ==> #t
190(#<procedure> flying-fish)  ==> "flying-fish"
191(#<procedure> martin)  ==> "martin"
192(#<procedure> Malvina)  ==> "Malvina"
193(standard-case #t)  ==> #t
194(string-set! "cb")  ==> "cb"
195(#<procedure> ab)  ==> "ab"
196(#<procedure> "ab")  ==> ab
197(#<procedure> mississippi mississippi)  ==> #t
198(string->symbol #f)  ==> #f
199(#<procedure> "jollywog")  ==> jollywog
200SECTION(6 5 5)
201(#<procedure> 3)  ==> #t
202(#<procedure> 3)  ==> #t
203(#<procedure> 3)  ==> #t
204(#<procedure> 3)  ==> #t
205(#<procedure> 3)  ==> #t
206(#<procedure> 3)  ==> #t
207(#<procedure> 3)  ==> #f
208(#<procedure> 22 22 22)  ==> #t
209(#<procedure> 22 22)  ==> #t
210(#<procedure> 34 34 35)  ==> #f
211(#<procedure> 34 35)  ==> #f
212(#<procedure> 3 -6246)  ==> #t
213(#<procedure> 9 9 -2424)  ==> #f
214(#<procedure> 3 -4 -6246)  ==> #t
215(#<procedure> 9 9)  ==> #t
216(#<procedure> 8 9)  ==> #f
217(#<procedure> -1 2 3 4 5 6 7 8)  ==> #t
218(#<procedure> -1 2 3 4 4 5 6 7)  ==> #f
219(#<procedure> -1 2 3 4 5 6 7 8)  ==> #t
220(#<procedure> -1 2 3 4 4 5 6 7)  ==> #t
221(#<procedure> 1 3 2)  ==> #f
222(#<procedure> 1 3 2)  ==> #f
223(#<procedure> 0)  ==> #t
224(#<procedure> 1)  ==> #f
225(#<procedure> -1)  ==> #f
226(#<procedure> -100)  ==> #f
227(#<procedure> 4)  ==> #t
228(#<procedure> -4)  ==> #f
229(#<procedure> 0)  ==> #f
230(#<procedure> 4)  ==> #f
231(#<procedure> -4)  ==> #t
232(#<procedure> 0)  ==> #f
233(#<procedure> 3)  ==> #t
234(#<procedure> 2)  ==> #f
235(#<procedure> -4)  ==> #f
236(#<procedure> -1)  ==> #t
237(#<procedure> 3)  ==> #f
238(#<procedure> 2)  ==> #t
239(#<procedure> -4)  ==> #t
240(#<procedure> -1)  ==> #f
241(#<procedure> 34 5 7 38 6)  ==> 38
242(#<procedure> 3 5 5 330 4 -24)  ==> -24
243(#<procedure> 3 4)  ==> 7
244(#<procedure> 3)  ==> 3
245(#<procedure>)  ==> 0
246(#<procedure> 4)  ==> 4
247(#<procedure>)  ==> 1
248(#<procedure> 3 4)  ==> -1
249(#<procedure> 3)  ==> -3
250(#<procedure> -7)  ==> 7
251(#<procedure> 7)  ==> 7
252(#<procedure> 0)  ==> 0
253(#<procedure> 35 7)  ==> 5
254(#<procedure> -35 7)  ==> -5
255(#<procedure> 35 -7)  ==> -5
256(#<procedure> -35 -7)  ==> 5
257(#<procedure> 13 4)  ==> 1
258(#<procedure> 13 4)  ==> 1
259(#<procedure> -13 4)  ==> 3
260(#<procedure> -13 4)  ==> -1
261(#<procedure> 13 -4)  ==> -3
262(#<procedure> 13 -4)  ==> 1
263(#<procedure> -13 -4)  ==> -1
264(#<procedure> -13 -4)  ==> -1
265(#<procedure> 0 86400)  ==> 0
266(#<procedure> 0 -86400)  ==> 0
267(#<procedure> 238 9)  ==> #t
268(#<procedure> -238 9)  ==> #t
269(#<procedure> 238 -9)  ==> #t
270(#<procedure> -238 -9)  ==> #t
271(#<procedure> 0 4)  ==> 4
272(#<procedure> -4 0)  ==> 4
273(#<procedure> 32 -36)  ==> 4
274(#<procedure>)  ==> 0
275(#<procedure> 32 -36)  ==> 288
276(#<procedure>)  ==> 1
277SECTION(6 5 5)
278(#<procedure> "+#.#")  ==> #t
279(#<procedure> "-#.#")  ==> #t
280(#<procedure> "#.#")  ==> #t
281(#<procedure> "1/0")  ==> #t
282(#<procedure> "-1/0")  ==> #t
283(#<procedure> "0/0")  ==> #t
284(#<procedure> "+1/0i")  ==> #t
285(#<procedure> "-1/0i")  ==> #t
286(#<procedure> "0/0i")  ==> #t
287(#<procedure> "0/0-0/0i")  ==> #t
288(#<procedure> "1/0-1/0i")  ==> #t
289(#<procedure> "-1/0+1/0i")  ==> #t
290(#<procedure> "#i")  ==> #t
291(#<procedure> "#e")  ==> #t
292(#<procedure> "#")  ==> #t
293(#<procedure> "#i0/0")  ==> #t
294SECTION(6 5 9)
295(#<procedure> 0)  ==> "0"
296(#<procedure> 100)  ==> "100"
297(#<procedure> 256 16)  ==> "100"
298(#<procedure> "100")  ==> 100
299(#<procedure> "100" 16)  ==> 256
300(#<procedure> "")  ==> #f
301(#<procedure> ".")  ==> #f
302(#<procedure> "d")  ==> #f
303(#<procedure> "D")  ==> #f
304(#<procedure> "i")  ==> #f
305(#<procedure> "I")  ==> #f
306(#<procedure> "3i")  ==> #f
307(#<procedure> "3I")  ==> #f
308(#<procedure> "33i")  ==> #f
309(#<procedure> "33I")  ==> #f
310(#<procedure> "3.3i")  ==> #f
311(#<procedure> "3.3I")  ==> #f
312(#<procedure> "-")  ==> #f
313(#<procedure> "+")  ==> #f
314(string->number #t)  ==> #t
315(string->number #t)  ==> #t
316SECTION(6 6)
317(#<procedure> #\a)  ==> #t
318(#<procedure> #\()  ==> #t
319(#<procedure> #\space)  ==> #t
320(#<procedure> #\newline)  ==> #t
321(#<procedure> #\A #\B)  ==> #f
322(#<procedure> #\a #\b)  ==> #f
323(#<procedure> #\9 #\0)  ==> #f
324(#<procedure> #\A #\A)  ==> #t
325(#<procedure> #\A #\B)  ==> #t
326(#<procedure> #\a #\b)  ==> #t
327(#<procedure> #\9 #\0)  ==> #f
328(#<procedure> #\A #\A)  ==> #f
329(#<procedure> #\A #\B)  ==> #f
330(#<procedure> #\a #\b)  ==> #f
331(#<procedure> #\9 #\0)  ==> #t
332(#<procedure> #\A #\A)  ==> #f
333(#<procedure> #\A #\B)  ==> #t
334(#<procedure> #\a #\b)  ==> #t
335(#<procedure> #\9 #\0)  ==> #f
336(#<procedure> #\A #\A)  ==> #t
337(#<procedure> #\A #\B)  ==> #f
338(#<procedure> #\a #\b)  ==> #f
339(#<procedure> #\9 #\0)  ==> #t
340(#<procedure> #\A #\A)  ==> #t
341(#<procedure> #\A #\B)  ==> #f
342(#<procedure> #\a #\B)  ==> #f
343(#<procedure> #\A #\b)  ==> #f
344(#<procedure> #\a #\b)  ==> #f
345(#<procedure> #\9 #\0)  ==> #f
346(#<procedure> #\A #\A)  ==> #t
347(#<procedure> #\A #\a)  ==> #t
348(#<procedure> #\A #\B)  ==> #t
349(#<procedure> #\a #\B)  ==> #t
350(#<procedure> #\A #\b)  ==> #t
351(#<procedure> #\a #\b)  ==> #t
352(#<procedure> #\9 #\0)  ==> #f
353(#<procedure> #\A #\A)  ==> #f
354(#<procedure> #\A #\a)  ==> #f
355(#<procedure> #\A #\B)  ==> #f
356(#<procedure> #\a #\B)  ==> #f
357(#<procedure> #\A #\b)  ==> #f
358(#<procedure> #\a #\b)  ==> #f
359(#<procedure> #\9 #\0)  ==> #t
360(#<procedure> #\A #\A)  ==> #f
361(#<procedure> #\A #\a)  ==> #f
362(#<procedure> #\A #\B)  ==> #t
363(#<procedure> #\a #\B)  ==> #t
364(#<procedure> #\A #\b)  ==> #t
365(#<procedure> #\a #\b)  ==> #t
366(#<procedure> #\9 #\0)  ==> #f
367(#<procedure> #\A #\A)  ==> #t
368(#<procedure> #\A #\a)  ==> #t
369(#<procedure> #\A #\B)  ==> #f
370(#<procedure> #\a #\B)  ==> #f
371(#<procedure> #\A #\b)  ==> #f
372(#<procedure> #\a #\b)  ==> #f
373(#<procedure> #\9 #\0)  ==> #t
374(#<procedure> #\A #\A)  ==> #t
375(#<procedure> #\A #\a)  ==> #t
376(#<procedure> #\a)  ==> #t
377(#<procedure> #\A)  ==> #t
378(#<procedure> #\z)  ==> #t
379(#<procedure> #\Z)  ==> #t
380(#<procedure> #\0)  ==> #f
381(#<procedure> #\9)  ==> #f
382(#<procedure> #\space)  ==> #f
383(#<procedure> #\;)  ==> #f
384(#<procedure> #\a)  ==> #f
385(#<procedure> #\A)  ==> #f
386(#<procedure> #\z)  ==> #f
387(#<procedure> #\Z)  ==> #f
388(#<procedure> #\0)  ==> #t
389(#<procedure> #\9)  ==> #t
390(#<procedure> #\space)  ==> #f
391(#<procedure> #\;)  ==> #f
392(#<procedure> #\a)  ==> #f
393(#<procedure> #\A)  ==> #f
394(#<procedure> #\z)  ==> #f
395(#<procedure> #\Z)  ==> #f
396(#<procedure> #\0)  ==> #f
397(#<procedure> #\9)  ==> #f
398(#<procedure> #\space)  ==> #t
399(#<procedure> #\;)  ==> #f
400(#<procedure> #\0)  ==> #f
401(#<procedure> #\9)  ==> #f
402(#<procedure> #\space)  ==> #f
403(#<procedure> #\;)  ==> #f
404(#<procedure> #\0)  ==> #f
405(#<procedure> #\9)  ==> #f
406(#<procedure> #\space)  ==> #f
407(#<procedure> #\;)  ==> #f
408(#<procedure> 46)  ==> #\.
409(#<procedure> 65)  ==> #\A
410(#<procedure> 97)  ==> #\a
411(#<procedure> #\A)  ==> #\A
412(#<procedure> #\a)  ==> #\A
413(#<procedure> #\A)  ==> #\a
414(#<procedure> #\a)  ==> #\a
415SECTION(6 7)
416(#<procedure> "The word \"recursion\\\" has many meanings.")  ==> #t
417(string-set! "?**")  ==> "?**"
418(#<procedure> #\a #\b #\c)  ==> "abc"
419(#<procedure>)  ==> ""
420(#<procedure> "abc")  ==> 3
421(#<procedure> "abc" 0)  ==> #\a
422(#<procedure> "abc" 2)  ==> #\c
423(#<procedure> "")  ==> 0
424(#<procedure> "ab" 0 0)  ==> ""
425(#<procedure> "ab" 1 1)  ==> ""
426(#<procedure> "ab" 2 2)  ==> ""
427(#<procedure> "ab" 0 1)  ==> "a"
428(#<procedure> "ab" 1 2)  ==> "b"
429(#<procedure> "ab" 0 2)  ==> "ab"
430(#<procedure> "foo" "bar")  ==> "foobar"
431(#<procedure> "foo")  ==> "foo"
432(#<procedure> "foo" "")  ==> "foo"
433(#<procedure> "" "foo")  ==> "foo"
434(#<procedure>)  ==> ""
435(#<procedure> 0)  ==> ""
436(#<procedure> "" "")  ==> #t
437(#<procedure> "" "")  ==> #f
438(#<procedure> "" "")  ==> #f
439(#<procedure> "" "")  ==> #t
440(#<procedure> "" "")  ==> #t
441(#<procedure> "" "")  ==> #t
442(#<procedure> "" "")  ==> #f
443(#<procedure> "" "")  ==> #f
444(#<procedure> "" "")  ==> #t
445(#<procedure> "" "")  ==> #t
446(#<procedure> "A" "B")  ==> #f
447(#<procedure> "a" "b")  ==> #f
448(#<procedure> "9" "0")  ==> #f
449(#<procedure> "A" "A")  ==> #t
450(#<procedure> "A" "B")  ==> #t
451(#<procedure> "a" "b")  ==> #t
452(#<procedure> "9" "0")  ==> #f
453(#<procedure> "A" "A")  ==> #f
454(#<procedure> "A" "B")  ==> #f
455(#<procedure> "a" "b")  ==> #f
456(#<procedure> "9" "0")  ==> #t
457(#<procedure> "A" "A")  ==> #f
458(#<procedure> "A" "B")  ==> #t
459(#<procedure> "a" "b")  ==> #t
460(#<procedure> "9" "0")  ==> #f
461(#<procedure> "A" "A")  ==> #t
462(#<procedure> "A" "B")  ==> #f
463(#<procedure> "a" "b")  ==> #f
464(#<procedure> "9" "0")  ==> #t
465(#<procedure> "A" "A")  ==> #t
466(#<procedure> "A" "B")  ==> #f
467(#<procedure> "a" "B")  ==> #f
468(#<procedure> "A" "b")  ==> #f
469(#<procedure> "a" "b")  ==> #f
470(#<procedure> "9" "0")  ==> #f
471(#<procedure> "A" "A")  ==> #t
472(#<procedure> "A" "a")  ==> #t
473(#<procedure> "A" "B")  ==> #t
474(#<procedure> "a" "B")  ==> #t
475(#<procedure> "A" "b")  ==> #t
476(#<procedure> "a" "b")  ==> #t
477(#<procedure> "9" "0")  ==> #f
478(#<procedure> "A" "A")  ==> #f
479(#<procedure> "A" "a")  ==> #f
480(#<procedure> "A" "B")  ==> #f
481(#<procedure> "a" "B")  ==> #f
482(#<procedure> "A" "b")  ==> #f
483(#<procedure> "a" "b")  ==> #f
484(#<procedure> "9" "0")  ==> #t
485(#<procedure> "A" "A")  ==> #f
486(#<procedure> "A" "a")  ==> #f
487(#<procedure> "A" "B")  ==> #t
488(#<procedure> "a" "B")  ==> #t
489(#<procedure> "A" "b")  ==> #t
490(#<procedure> "a" "b")  ==> #t
491(#<procedure> "9" "0")  ==> #f
492(#<procedure> "A" "A")  ==> #t
493(#<procedure> "A" "a")  ==> #t
494(#<procedure> "A" "B")  ==> #f
495(#<procedure> "a" "B")  ==> #f
496(#<procedure> "A" "b")  ==> #f
497(#<procedure> "a" "b")  ==> #f
498(#<procedure> "9" "0")  ==> #t
499(#<procedure> "A" "A")  ==> #t
500(#<procedure> "A" "a")  ==> #t
501SECTION(6 8)
502(#<procedure> #(0 (2 2 2 2) "Anna"))  ==> #t
503(#<procedure> a b c)  ==> #(a b c)
504(#<procedure>)  ==> #()
505(#<procedure> #(0 (2 2 2 2) "Anna"))  ==> 3
506(#<procedure> #())  ==> 0
507(#<procedure> #(1 1 2 3 5 8 13 21) 5)  ==> 8
508(vector-set #(0 ("Sue" "Sue") "Anna"))  ==> #(0 ("Sue" "Sue") "Anna")
509(#<procedure> 2 hi)  ==> #(hi hi)
510(#<procedure> 0)  ==> #()
511(#<procedure> 0 a)  ==> #()
512SECTION(6 9)
513(#<procedure> #<procedure>)  ==> #t
514(#<procedure> #<procedure>)  ==> #t
515(#<procedure> (lambda (x) (* x x)))  ==> #f
516(#<procedure> #<procedure>)  ==> #t
517(#<procedure> #<procedure> (3 4))  ==> 7
518(#<procedure> #<procedure> (3 4))  ==> 7
519(#<procedure> #<procedure> 10 (3 4))  ==> 17
520(#<procedure> #<procedure> ())  ==> ()
521(#<procedure> 12 75)  ==> 30
522(#<procedure> #<procedure> ((a b) (d e) (g h)))  ==> (b e h)
523(#<procedure> #<procedure> (1 2 3) (4 5 6))  ==> (5 7 9)
524(#<procedure> #<procedure> (1 2 3))  ==> (1 2 3)
525(#<procedure> #<procedure> (1 2 3))  ==> (1 2 3)
526(#<procedure> #<procedure> (1 2 3))  ==> (-1 -2 -3)
527(for-each #(0 1 4 9 16))  ==> #(0 1 4 9 16)
528(#<procedure> #<procedure>)  ==> -3
529(#<procedure> (1 2 3 4))  ==> 4
530(#<procedure> (a b . c))  ==> #f
531(#<procedure> #<procedure> ())  ==> ()
532SECTION(6 10 1)
533(#<procedure> #<input port "(stdin)">)  ==> #t
534(#<procedure> #<output port "(stdout)">)  ==> #t
535(#<procedure> "r4rstest.scm" #<procedure>)  ==> #t
536(#<procedure> #<input port "r4rstest.scm">)  ==> #t
537SECTION(6 10 2)
538(#<procedure> #<input port "r4rstest.scm">)  ==> #\;
539(#<procedure> #<input port "r4rstest.scm">)  ==> #\;
540(#<procedure> #<input port "r4rstest.scm">)  ==> (define cur-section (quote ()))
541(#<procedure> #<input port "r4rstest.scm">)  ==> #\(
542(#<procedure> #<input port "r4rstest.scm">)  ==> (define errs (quote ()))
543SECTION(6 10 3)
544(#<procedure> "tmp1" #<procedure>)  ==> #t
545(#<procedure> #<input port "tmp1">)  ==> (define foo (quote (#t #f a () 9739 -3 . #((test) "te \" \" st" "" test #() b c))))
546(#<procedure> #!eof)  ==> #t
547(#<procedure> #!eof)  ==> #t
548(input-port? #t)  ==> #t
549(#<procedure> #<input port "tmp1">)  ==> #\;
550(#<procedure> #<input port "tmp1">)  ==> #\;
551(#<procedure> #<input port "tmp1">)  ==> #\;
552(#<procedure> #<input port "tmp1">)  ==> (#t #f a () 9739 -3 . #((test) "te \" \" st" "" test #() b c))
553(#<procedure> #<input port "tmp1">)  ==> (define foo (quote (#t #f a () 9739 -3 . #((test) "te \" \" st" "" test #() b c))))
554(#<procedure> #<output port "tmp2">)  ==> #t
555(#<procedure> #<input port "tmp2">)  ==> (define foo (quote (#t #f a () 9739 -3 . #((test) "te \" \" st" "" test #() b c))))
556(#<procedure> #!eof)  ==> #t
557(#<procedure> #!eof)  ==> #t
558(input-port? #t)  ==> #t
559(#<procedure> #<input port "tmp2">)  ==> #\;
560(#<procedure> #<input port "tmp2">)  ==> #\;
561(#<procedure> #<input port "tmp2">)  ==> #\;
562(#<procedure> #<input port "tmp2">)  ==> (#t #f a () 9739 -3 . #((test) "te \" \" st" "" test #() b c))
563(#<procedure> #<input port "tmp2">)  ==> (define foo (quote (#t #f a () 9739 -3 . #((test) "te \" \" st" "" test #() b c))))
564
565Passed all tests
566
567;testing inexact numbers;
568SECTION(6 2)
569(#<procedure> 1 1.0)  ==> #f
570(#<procedure> 0 0.0)  ==> #f
571SECTION(6 5 5)
572(#<procedure> 3.9)  ==> #t
573(max #t)  ==> #t
574(#<procedure> 3.9 4)  ==> 4.0
575(#<procedure> 4)  ==> 4.0
576(#<procedure> 4.0)  ==> 4.0
577(#<procedure> 4)  ==> 4
578(#<procedure> 4.0)  ==> 4
579(#<procedure> -4.5)  ==> -4.0
580(#<procedure> -3.5)  ==> -4.0
581(#<procedure> -3.9)  ==> -4.0
582(#<procedure> 0.0)  ==> 0.0
583(#<procedure> 0.25)  ==> 0.0
584(#<procedure> 0.8)  ==> 1.0
585(#<procedure> 3.5)  ==> 4.0
586(#<procedure> 4.5)  ==> 4.0
587(#<procedure> 0 0)  ==> 1
588(#<procedure> 0 1)  ==> 0
589(#<procedure> 1 1)  ==> 0.785398163397448
590(#<procedure> "tmp3" #<procedure>)  ==> #t
591(#<procedure> #<input port "tmp3">)  ==> (define foo (quote (0.25 -3.25)))
592(#<procedure> #!eof)  ==> #t
593(#<procedure> #!eof)  ==> #t
594(input-port? #t)  ==> #t
595(#<procedure> #<input port "tmp3">)  ==> #\;
596(#<procedure> #<input port "tmp3">)  ==> #\;
597(#<procedure> #<input port "tmp3">)  ==> #\;
598(#<procedure> #<input port "tmp3">)  ==> (0.25 -3.25)
599(#<procedure> #<input port "tmp3">)  ==> (define foo (quote (0.25 -3.25)))
600(pentium-fdiv-bug #t)  ==> #t
601
602Passed all tests
603SECTION(6 5 6)
604(float-print-test #t)  ==> #t
605Number readback failure for (+ 1.0 (* -100 2.22044604925031e-16))
6060.999999999999978
607Number readback failure for (+ 10.0 (* -100 1.77635683940025e-15))
6089.99999999999982
609Number readback failure for (+ 100.0 (* -100 1.4210854715202e-14))
61099.9999999999986
611Number readback failure for (+ 1e+20 (* -100 16384.0))
6129.99999999999984e+19
613Number readback failure for (+ 1e+50 (* -100 2.07691874341393e+34))
6149.99999999999979e+49
615Number readback failure for (+ 1e+100 (* -100 1.94266889222573e+84))
6169.99999999999981e+99
617Number readback failure for (+ 0.1 (* -100 1.38777878078145e-17))
6180.0999999999999986
619Number readback failure for (+ 0.01 (* -100 1.73472347597681e-18))
6200.00999999999999983
621Number readback failure for (+ 0.001 (* -100 2.16840434497101e-19))
6220.000999999999999978
623Number readback failure for (+ 1e-20 (* -100 1.50463276905253e-36))
6249.99999999999985e-21
625Number readback failure for (+ 1e-50 (* -100 1.18694596821997e-66))
6269.99999999999988e-51
627Number readback failure for (+ 1e-100 (* -100 1.26897091865782e-116))
6289.99999999999987e-101
629(mult-float-print-test #f)  ==> #f
630 BUT EXPECTED #t
631Number readback failure for (+ 3.0 (* -100 4.44089209850063e-16))
6322.99999999999996
633Number readback failure for (+ 30.0 (* -100 3.5527136788005e-15))
63429.9999999999996
635Number readback failure for (+ 300.0 (* -100 5.6843418860808e-14))
636299.999999999994
637Number readback failure for (+ 3e+20 (* -100 65536.0))
6382.99999999999993e+20
639Number readback failure for (+ 3e+50 (* -100 4.15383748682786e+34))
6402.99999999999996e+50
641Number readback failure for (+ 3e+100 (* -100 3.88533778445146e+84))
6422.99999999999996e+100
643Number readback failure for (+ 0.3 (* -100 5.55111512312578e-17))
6440.299999999999994
645Number readback failure for (+ 0.03 (* -100 3.46944695195361e-18))
6460.0299999999999997
647Number readback failure for (+ 0.003 (* -100 4.33680868994202e-19))
6480.00299999999999996
649Number readback failure for (+ 3e-20 (* -100 6.01853107621011e-36))
6502.99999999999994e-20
651Number readback failure for (+ 3e-50 (* -100 4.7477838728799e-66))
6522.99999999999995e-50
653Number readback failure for (+ 3e-100 (* -100 5.0758836746313e-116))
6542.99999999999995e-100
655(mult-float-print-test #f)  ==> #f
656 BUT EXPECTED #t
657Number readback failure for (+ 7.0 (* -100 8.88178419700125e-16))
6586.99999999999991
659Number readback failure for (+ 70.0 (* -100 1.4210854715202e-14))
66069.9999999999986
661Number readback failure for (+ 700.0 (* -100 1.13686837721616e-13))
662699.999999999989
663Number readback failure for (+ 7e+20 (* -100 131072.0))
6646.99999999999987e+20
665Number readback failure for (+ 7e+50 (* -100 8.30767497365572e+34))
6666.99999999999992e+50
667Number readback failure for (+ 7e+100 (* -100 1.55413511378058e+85))
6686.99999999999984e+100
669Number readback failure for (+ 0.7 (* -99 1.11022302462516e-16))
6700.699999999999989
671Number readback failure for (+ 0.07 (* -100 1.38777878078145e-17))
6720.0699999999999986
673Number readback failure for (+ 0.007 (* -100 8.67361737988404e-19))
6740.00699999999999991
675Number readback failure for (+ 7e-20 (* -99 1.20370621524202e-35))
6766.99999999999988e-20
677Number readback failure for (+ 7e-50 (* -100 9.4955677457598e-66))
6786.9999999999999e-50
679Number readback failure for (+ 7e-100 (* -100 1.01517673492626e-115))
6806.9999999999999e-100
681(mult-float-print-test #f)  ==> #f
682 BUT EXPECTED #t
683Number readback failure for (+ 3.14159265358979 (* -100 4.44089209850063e-16))
6843.14159265358975
685Number readback failure for (+ 31.4159265358979 (* -100 3.5527136788005e-15))
68631.4159265358976
687Number readback failure for (+ 314.159265358979 (* -100 5.6843418860808e-14))
688314.159265358974
689Number readback failure for (+ 3.14159265358979e+20 (* -100 65536.0))
6903.14159265358973e+20
691Number readback failure for (+ 3.14159265358979e+50 (* -100 4.15383748682786e+34))
6923.14159265358975e+50
693Number readback failure for (+ 3.14159265358979e+100 (* -100 3.88533778445146e+84))
6943.14159265358975e+100
695Number readback failure for (+ 0.314159265358979 (* -100 5.55111512312578e-17))
6960.314159265358974
697Number readback failure for (+ 0.0314159265358979 (* -100 6.93889390390723e-18))
6980.0314159265358972
699Number readback failure for (+ 0.00314159265358979 (* -99 4.33680868994202e-19))
7000.00314159265358975
701Number readback failure for (+ 3.14159265358979e-20 (* -100 6.01853107621011e-36))
7023.14159265358973e-20
703Number readback failure for (+ 3.14159265358979e-50 (* -100 4.7477838728799e-66))
7043.14159265358975e-50
705Number readback failure for (+ 3.14159265358979e-100 (* -100 5.0758836746313e-116))
7063.14159265358974e-100
707(mult-float-print-test #f)  ==> #f
708 BUT EXPECTED #t
709Number readback failure for (+ 2.71828182845905 (* -100 4.44089209850063e-16))
7102.718281828459
711Number readback failure for (+ 27.1828182845905 (* -100 3.5527136788005e-15))
71227.1828182845901
713Number readback failure for (+ 271.828182845905 (* -100 5.6843418860808e-14))
714271.828182845899
715Number readback failure for (+ 2.71828182845905e+20 (* -100 32768.0))
7162.71828182845901e+20
717Number readback failure for (+ 2.71828182845905e+50 (* -100 4.15383748682786e+34))
7182.718281828459e+50
719Number readback failure for (+ 2.71828182845905e+100 (* -100 3.88533778445146e+84))
7202.71828182845901e+100
721Number readback failure for (+ 0.271828182845905 (* -99 5.55111512312578e-17))
7220.271828182845899
723Number readback failure for (+ 0.0271828182845905 (* -100 3.46944695195361e-18))
7240.0271828182845901
725Number readback failure for (+ 0.00271828182845905 (* -100 4.33680868994202e-19))
7260.002718281828459
727Number readback failure for (+ 2.71828182845904e-20 (* -100 6.01853107621011e-36))
7282.71828182845898e-20
729Number readback failure for (+ 2.71828182845905e-50 (* -100 4.7477838728799e-66))
7302.718281828459e-50
731Number readback failure for (+ 2.71828182845905e-100 (* -100 5.0758836746313e-116))
7322.71828182845899e-100
733(mult-float-print-test #f)  ==> #f
734 BUT EXPECTED #t
735
736To fully test continuations, Scheme 4, and DELAY/FORCE do:
737(test-cont) (test-sc4) (test-delay)
738
739;testing continuations;
740SECTION(6 9)
741(#<procedure> (a (b (c))) ((a) b c))  ==> #t
742(#<procedure> (a (b (c))) ((a) b c d))  ==> #f
743
744errors were:
745(SECTION (got expected (call)))
746((6 5 6) (#f #t (mult-float-print-test #f)))
747((6 5 6) (#f #t (mult-float-print-test #f)))
748((6 5 6) (#f #t (mult-float-print-test #f)))
749((6 5 6) (#f #t (mult-float-print-test #f)))
750((6 5 6) (#f #t (mult-float-print-test #f)))
751
752
753;testing scheme 4 functions;
754SECTION(6 7)
755(#<procedure> "P l")  ==> (#\P #\space #\l)
756(#<procedure> "")  ==> ()
757(#<procedure> (#\1 #\\ #\"))  ==> "1\\\""
758(#<procedure> ())  ==> ""
759SECTION(6 8)
760(#<procedure> #(dah dah didah))  ==> (dah dah didah)
761(#<procedure> #())  ==> ()
762(#<procedure> (dididit dah))  ==> #(dididit dah)
763(#<procedure> ())  ==> #()
764SECTION(6 10 4)
765(load (#t #f a () 9739 -3 . #((test) "te \" \" st" "" test #() b c)))  ==> (#t #f a () 9739 -3 . #((test) "te \" \" st" "" test #() b c))
766
767errors were:
768(SECTION (got expected (call)))
769((6 5 6) (#f #t (mult-float-print-test #f)))
770((6 5 6) (#f #t (mult-float-print-test #f)))
771((6 5 6) (#f #t (mult-float-print-test #f)))
772((6 5 6) (#f #t (mult-float-print-test #f)))
773((6 5 6) (#f #t (mult-float-print-test #f)))
774
775
776;testing DELAY and FORCE;
777SECTION(6 9)
778(delay 3)  ==> 3
779(delay (3 3))  ==> (3 3)
780(delay 2)  ==> 2
781(#<procedure> #<promise>)  ==> 6
782(#<procedure> #<promise>)  ==> 6
783(force 3)  ==> 3
784
785errors were:
786(SECTION (got expected (call)))
787((6 5 6) (#f #t (mult-float-print-test #f)))
788((6 5 6) (#f #t (mult-float-print-test #f)))
789((6 5 6) (#f #t (mult-float-print-test #f)))
790((6 5 6) (#f #t (mult-float-print-test #f)))
791((6 5 6) (#f #t (mult-float-print-test #f)))
792
Note: See TracBrowser for help on using the repository browser.