swig/Examples/test-suite/scilab/catches_strings_runme.sci
William S Fulton ed333b6b97 std::string throws typemaps
Go, Guile, Racket, Scilab: Add throws typemaps for std::string so that
thrown string exception messages can be seen.

Test all language for std::string throws typemaps
2022-09-19 09:09:29 +01:00

17 lines
502 B
Scilab

exec("swigtest.start", -1);
ierr = execstr("StringsThrower_charstring()", 'errcatch');
checkequal(ierr, 20000, "wrong/no exception thrown")
if (strstr(lasterror(), "charstring message") == '')
printf("Should have thrown an exception")
exit(1)
end
ierr = execstr("StringsThrower_stdstring()", 'errcatch');
checkequal(ierr, 20000, "wrong/no exception thrown")
if (strstr(lasterror(), "stdstring message") == '')
printf("Should have thrown an exception")
exit(1)
end
exec("swigtest.quit", -1);