Added chicken runme

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7144 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
John Lenz 2005-04-05 17:50:05 +00:00
commit 1a2b1863b1

View file

@ -0,0 +1,36 @@
(load-library 'overload_simple "overload_simple.so")
(define-macro (check test)
`(if (not ,test) (error ,'test)))
(check (string=? (foo 3) "foo:int"))
(exit 0)
(check (string=? (foo 3.01) "foo:double"))
(check (string=? (foo "hey") "foo:char *"))
(define f (make <Foo>))
(define b (make <Bar>))
(define s (make <Spam>))
(check (string=? (foo f) "foo:Foo *"))
(check (string=? (foo b) "foo:Bar *"))
;; now check blah
(check (string=? (blah 2.01) "blah:double"))
(check (string=? (blah "hey") "blah:char *"))
;; now check Spam member functions
(check (string=? (foo s 2) "foo:int"))
(check (string=? (foo s 2.1) "foo:double"))
(check (string=? (foo s "hey") "foo:char *"))
(check (string=? (foo s f) "foo:Foo *"))
(check (string=? (foo s b) "foo:Bar *"))
;; check static member funcs
(check (string=? (bar 3) "bar:int"))
(check (string=? (bar 3.2) "bar:double"))
(check (string=? (bar "hey") "bar:char *"))
(check (string=? (bar f) "bar:Foo *"))
(check (string=? (bar b) "bar:Bar *"))
(exit 0)