swig/SWIG/Examples/test-suite/guile/cpp_namespace_runme.scm
Matthias Köppe 109a4b230e John Lenz wrote:
I have recently been working on the guile module (as
discussed before....) and to help test it I have added
a bunch of _runme.scm files to the guile test-suite.
Mostly I just copied the python tests. What I mean is
the guile tests call exactly the same functions as the
_runme.py files.

Also a couple of tests (name_runme.scm,
list_vector_runme.scm, and char_constant_runme.scm)
were not calling the correct initilization function, so
I fixed those too.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4193 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2002-12-12 15:58:53 +00:00

44 lines
1 KiB
Scheme

(dynamic-call "scm_init_cpp_namespace_module" (dynamic-link "./libcpp_namespace.so"))
(define n (fact 4))
(if (not (= n 24))
(error "Bad return value!"))
(if (not (= (Foo) 42))
(error "bad variable value!"))
(define t (new-Test))
(if (not (string=? (Test-method t) "Test::method"))
(error "Bad method return value!"))
(if (not (string=? (do-method t) "Test::method"))
(error "Bad return value!"))
(if (not (string=? (do-method2 t) "Test::method"))
(error "Bad return value!"))
(weird "hello" 4)
(delete-Test t)
(define t2 (new-Test2))
(define t3 (new-Test3))
(define t4 (new-Test4))
(define t5 (new-Test5))
(if (not (= (foo3 42) 42))
(error "Bad return value!"))
(if (not (string=? (do-method3 t2 40) "Test2::method"))
(error "bad return value!"))
(if (not (string=? (do-method3 t3 40) "Test3::method"))
(error "bad return value"))
(if (not (string=? (do-method3 t4 40) "Test4::method"))
(error "bad return value"))
(if (not (string=? (do-method3 t5 40) "Test5::method"))
(error "bad return value"))
(exit 0)