PageRenderTime 31ms CodeModel.GetById 21ms app.highlight 5ms RepoModel.GetById 2ms app.codeStats 0ms

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

#
Scheme | 29 lines | 19 code | 10 blank | 0 comment | 1 complexity | 1360e53ad247811790bbd4c7ed839b54 MD5 | raw file
 1(load "newobject2.so")
 2
 3(define f (make <Foo>))
 4
 5(slot-set! f 'dummy 14)
 6(if (not (= (slot-ref f 'dummy) 14))
 7  (error "Bad dummy value"))
 8
 9(if (not (= (fooCount) 0))
10  (error "Bad foo count 1"))
11
12(define f2 (makeFoo))
13
14(if (not (= (fooCount) 1))
15  (error "Bad foo count 2"))
16
17(slot-set! f2 'dummy 16)
18(if (not (= (slot-ref f2 'dummy) 16))
19  (error "Bad dummy value for f2"))
20
21(set! f #f)
22(set! f2 #f)
23
24(gc #t)
25
26(if (not (= (fooCount) -1))
27  (error "Bad foo count 3"))
28
29(exit 0)