Lots more bug fixes for the chicken module: almost the entire test-sutie now runs
The only tests that are failing are ones that depend on std_vector.i and similar git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7079 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
40d483208a
commit
92df04c40b
17 changed files with 322 additions and 43 deletions
2
SWIG/Examples/test-suite/chicken/cpp_enum_runme.ss
Normal file
2
SWIG/Examples/test-suite/chicken/cpp_enum_runme.ss
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
(load-library 'cpp-enum "cpp_enum.so")
|
||||
(include "../schemerunme/cpp_enum.scm")
|
||||
2
SWIG/Examples/test-suite/chicken/li_std_string_runme.ss
Normal file
2
SWIG/Examples/test-suite/chicken/li_std_string_runme.ss
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
(load-library 'li-std-string "li_std_string.so")
|
||||
(include "../schemerunme/li_std_string.scm")
|
||||
28
SWIG/Examples/test-suite/chicken/throw_exception_runme.ss
Normal file
28
SWIG/Examples/test-suite/chicken/throw_exception_runme.ss
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
(load-library 'throw-exception "throw_exception.so")
|
||||
|
||||
(define-macro (check-throw expr check)
|
||||
`(if (handle-exceptions exvar (if ,check #f (begin (print "Error executing: " ',expr " " exvar) (exit 1))) ,expr #t)
|
||||
(print "Expression did not throw an error: " ',expr)))
|
||||
|
||||
(define f (new-Foo))
|
||||
|
||||
(check-throw (Foo-test-int f) (= exvar 37))
|
||||
(check-throw (Foo-test-msg f) (string=? exvar "Dead"))
|
||||
(check-throw (Foo-test-cls f) (test-is-Error exvar))
|
||||
(check-throw (Foo-test-cls-ptr f) (test-is-Error exvar))
|
||||
(check-throw (Foo-test-cls-ref f) (test-is-Error exvar))
|
||||
(check-throw (Foo-test-cls-td f) (test-is-Error exvar))
|
||||
(check-throw (Foo-test-cls-ptr-td f) (test-is-Error exvar))
|
||||
(check-throw (Foo-test-cls-ref-td f) (test-is-Error exvar))
|
||||
|
||||
; don't know how to test this... it is returning a SWIG wrapped int *
|
||||
;(check-throw (Foo-test-array f) (equal? exvar '(0 1 2 3 4 5 6 7 8 9)))
|
||||
|
||||
(check-throw (Foo-test-multi f 1) (= exvar 37))
|
||||
(check-throw (Foo-test-multi f 2) (string=? exvar "Dead"))
|
||||
(check-throw (Foo-test-multi f 3) (test-is-Error exvar))
|
||||
|
||||
(set! f #f)
|
||||
(gc #t)
|
||||
|
||||
(exit 0)
|
||||
Loading…
Add table
Add a link
Reference in a new issue