Add catches_strings test to test throws char * typemap
This commit is contained in:
parent
034e2358f9
commit
4a29229bab
21 changed files with 286 additions and 0 deletions
17
Examples/test-suite/go/catches_strings_runme.go
Normal file
17
Examples/test-suite/go/catches_strings_runme.go
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
package main
|
||||
|
||||
import "strings"
|
||||
import . "swigtests/catches_strings"
|
||||
|
||||
func main() {
|
||||
exception_thrown := false
|
||||
func() {
|
||||
defer func() {
|
||||
exception_thrown = strings.Index(recover().(string), "charstring message") == 0
|
||||
}()
|
||||
StringsThrowerCharstring()
|
||||
}()
|
||||
if !exception_thrown {
|
||||
panic(0)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue