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.scm
Normal file
31
Examples/test-suite/schemerunme/global_vars.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 (new-A))
|
||||
(A-x-set sa 5)
|
||||
(a sa)
|
||||
(check (= (A-x-get (a)) 5))
|
||||
|
||||
(ap sa)
|
||||
(check (= (A-x-get (ap)) 5))
|
||||
(A-x-set sa 10)
|
||||
(check (= (A-x-get (ap)) 10))
|
||||
|
||||
(define sa2 (new-A))
|
||||
(A-x-set sa2 -4)
|
||||
(cap sa2)
|
||||
(check (= (A-x-get (cap)) -4))
|
||||
(A-x-set sa2 -7)
|
||||
(check (= (A-x-get (cap)) -7))
|
||||
|
||||
(check (= (A-x-get (ar)) 5))
|
||||
(ar sa2)
|
||||
(check (= (A-x-get (ar)) -7))
|
||||
|
||||
(x 4)
|
||||
(check (= (x) 4))
|
||||
|
||||
(exit 0)
|
||||
Loading…
Add table
Add a link
Reference in a new issue