PageRenderTime 25ms CodeModel.GetById 20ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

/trunk/Examples/test-suite/chicken/newobject1_runme_proxy.ss

#
Scheme | 30 lines | 17 code | 13 blank | 0 comment | 1 complexity | 408c7b983d603183ce80c9b927ad4dd3 MD5 | raw file
 1(require 'newobject1)
 2
 3(define-macro (check-count val)
 4  `(if (not (= (Foo-fooCount) ,val)) (error "Error checking val " ,val " != " ,(Foo-fooCount))))
 5
 6(define f (Foo-makeFoo))
 7
 8(check-count 1)
 9
10(define f2 (makeMore f))
11
12(check-count 2)
13
14(set! f #f)
15(gc #t)
16
17(check-count 1)
18
19(define f3 (makeMore f2))
20
21(check-count 2)
22
23(set! f3 #f)
24(set! f2 #f)
25
26(gc #t)
27
28(check-count 0)
29
30(exit 0)