~ubuntu-branches/ubuntu/hardy/swig1.3/hardy

« back to all changes in this revision

Viewing changes to Examples/test-suite/chicken/newobject2_runme.ss

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-12-05 01:16:04 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051205011604-ygx904it6413k3go
Tags: 1.3.27-1ubuntu1
Resynchronise with Debian again, for the new subversion packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
(load-library 'newobject2 "newobject2.so")
2
 
 
3
 
(define f (make <Foo>))
4
 
 
5
 
(slot-set! f 'dummy 14)
6
 
(if (not (= (slot-ref f 'dummy) 14))
 
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
7
  (error "Bad dummy value"))
8
8
 
 
9
(if (not (= (fooCount) 0))
 
10
  (error "Bad foo count 1"))
 
11
 
9
12
(define f2 (makeFoo))
10
13
 
11
 
(slot-set! f2 'dummy 16)
12
 
(if (not (= (slot-ref f2 'dummy) 16))
 
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))
13
19
  (error "Bad dummy value for f2"))
14
20
 
15
21
(set! f #f)
16
22
(set! f2 #f)
17
23
 
18
 
(gc)
 
24
(gc #t)
 
25
 
 
26
(if (not (= (fooCount) -1))
 
27
  (error "Bad foo count 3"))
19
28
 
20
29
(exit 0)