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

« back to all changes in this revision

Viewing changes to Examples/test-suite/schemerunme/global_vars.scm

  • 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
(define-macro (check test)
 
2
  `(if (not ,test) (error "Error in test" ',test)))
 
3
 
 
4
(b "hello")
 
5
(check (string=? (b) "hello"))
 
6
 
 
7
(define sa (new-A))
 
8
(A-x-set sa 5)
 
9
(a sa)
 
10
(check (= (A-x-get (a)) 5))
 
11
 
 
12
(ap sa)
 
13
(check (= (A-x-get (ap)) 5))
 
14
(A-x-set sa 10)
 
15
(check (= (A-x-get (ap)) 10))
 
16
 
 
17
(define sa2 (new-A))
 
18
(A-x-set sa2 -4)
 
19
(cap sa2)
 
20
(check (= (A-x-get (cap)) -4))
 
21
(A-x-set sa2 -7)
 
22
(check (= (A-x-get (cap)) -7))
 
23
 
 
24
(check (= (A-x-get (ar)) 5))
 
25
(ar sa2)
 
26
(check (= (A-x-get (ar)) -7))
 
27
 
 
28
(x 4)
 
29
(check (= (x) 4))
 
30
 
 
31
(exit 0)