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

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

#
Scheme | 29 lines | 19 code | 10 blank | 0 comment | 1 complexity | 4ef38ee3d7fbd777bccdc72c64be76c7 MD5 | raw file
 1(load "newobject2.so")
 2
 3(define f (new-Foo))
 4
 5(Foo-dummy-set f 14)
 6(if (not (= (Foo-dummy-get f) 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(Foo-dummy-set f2 16)
18(if (not (= (Foo-dummy-get f2) 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)