Ticket #32: tiny-examples.diff

File tiny-examples.diff, 1.5 KB (added by Tony Sidaway, 13 years ago)

diff for tiny-examples.scm as downloaded from Xeroc Parc website--hacks to make it work for modern MIT Scheme

Line 
129a30,33
2> (define-syntax test-pp
3>   (syntax-rules()
4>     ((_ x) (begin (newline)(pp 'x)(pp x)))))
5>
673a78,86
7> (test-pp p1)
8> (test-pp (slot-ref p1 'x))
9> (test-pp (slot-ref p1 'y))
10>
11>
12> (test-pp p2)
13> (test-pp (slot-ref p2 'x))
14> (test-pp (slot-ref p2 'y))
15>
16118a132,146
17> (test-pp p3)
18> (test-pp (pos-x p3))
19> (test-pp (pos-y p3))
20>
21> (test-pp p4)
22> (test-pp (pos-x p4))
23> (test-pp (pos-y p4))
24>
25> (move p4 10 11)
26>
27> (test-pp p4)
28> (test-pp (pos-x p4))
29> (test-pp (pos-y p4))
30>
31>
32134c162
33<       (if (null? (memq ':class-allocation slot))
34---
35>       (if (not (memq ':class-allocation slot))
36167a196,197
37> (test-pp s2)
38> (test-pp (slot-ref s2 'name))
39169a200,212
40> (test-pp s1)
41> (test-pp (slot-ref s1 'name))
42>
43> (test-pp s2)
44> (test-pp (slot-ref s2 'name))
45>
46> (test-pp s3)
47> (test-pp (slot-ref s3 'name))
48>
49> (test-pp <ship>)
50> (test-pp (class-direct-slots <ship>))
51>
52> (test-pp (map (lambda(x) (cons x (slot-ref x 'name))) (siblings s1)))
53216c259
54<                       (if (null? entry)
55---
56>                       (if (not entry)
57222c265
58<                       (if (null? entry)
59---
60>                       (if (not entry)
61256a300,304
62> (test-pp (slot-ref person1 'name))
63>
64> (slot-set! person1 'age 20)
65> (test-pp (slot-ref person1 'age))
66>
67358a407,409
68> (test-pp (equal? (test-around (make-generic))        '(foo bar baz)))
69>
70> (test-pp (equal? (test-around (make-around-generic)) '(bar foo baz)))
71360,361c411
72< (equal? (test-around (make-generic))        '(foo bar baz))
73< (equal? (test-around (make-around-generic)) '(bar foo baz))
74---
75> 'examples_all_done