Add catches_strings test to test throws char * typemap

This commit is contained in:
William S Fulton 2022-09-18 19:37:02 +01:00
commit 4a29229bab
21 changed files with 286 additions and 0 deletions

View 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")