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
11
Examples/test-suite/python/catches_strings_runme.py
Normal file
11
Examples/test-suite/python/catches_strings_runme.py
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
from catches_strings import *
|
||||
|
||||
exception_thrown = False
|
||||
try:
|
||||
StringsThrower.charstring()
|
||||
except RuntimeError as e:
|
||||
if "charstring message" not in str(e):
|
||||
raise RuntimeError("incorrect exception message:" + str(e))
|
||||
exception_thrown = True
|
||||
if not exception_thrown:
|
||||
raise RuntimeError("Should have thrown an exception")
|
||||
Loading…
Add table
Add a link
Reference in a new issue