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 @@
(load-extension "catches_strings.so")
(require (lib "defmacro.ss"))
(define exception_thrown "no exception thrown for kin")
(with-handlers ([exn:fail? (lambda (exn)
(set! exception_thrown (exn-message exn)))])
(StringsThrower-charstring))
(unless (string-contains? exception_thrown "charstring message")
(error (format "incorrect exception message: ~a" exception_thrown)))
(exit 0)