Add a whole bunch of chicken runme scripts, and fix the bugs exposed by those scripts
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7155 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ca7834309c
commit
b599732cdc
72 changed files with 1085 additions and 412 deletions
31
Examples/test-suite/schemerunme/global_vars_proxy.scm
Normal file
31
Examples/test-suite/schemerunme/global_vars_proxy.scm
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
(define-macro (check test)
|
||||
`(if (not ,test) (error "Error in test" ',test)))
|
||||
|
||||
(b "hello")
|
||||
(check (string=? (b) "hello"))
|
||||
|
||||
(define sa (make <A>))
|
||||
(slot-set! sa 'x 5)
|
||||
(a sa)
|
||||
(check (= (slot-ref (a) 'x) 5))
|
||||
|
||||
(ap sa)
|
||||
(check (= (slot-ref (ap) 'x) 5))
|
||||
(slot-set! sa 'x 10)
|
||||
(check (= (slot-ref (ap) 'x) 10))
|
||||
|
||||
(define sa2 (make <A>))
|
||||
(slot-set! sa2 'x -4)
|
||||
(cap sa2)
|
||||
(check (= (slot-ref (cap) 'x) -4))
|
||||
(slot-set! sa2 'x -7)
|
||||
(check (= (slot-ref (cap) 'x) -7))
|
||||
|
||||
(check (= (slot-ref (ar) 'x) 5))
|
||||
(ar sa2)
|
||||
(check (= (slot-ref (ar) 'x) -7))
|
||||
|
||||
(x 4)
|
||||
(check (= (x) 4))
|
||||
|
||||
(exit 0)
|
||||
Loading…
Add table
Add a link
Reference in a new issue