*** empty log message ***

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4477 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Logan Johnson 2003-03-08 04:51:15 +00:00
commit 56e34f6d39
2 changed files with 44 additions and 3 deletions

View file

@ -0,0 +1,33 @@
require 'lib_std_string'
include Lib_std_string
# Checking expected use of %typemap(in) std::string {}
test_value_in("Fee")
# Checking expected result of %typemap(out) std::string {}
raise RuntimeError unless test_value_in("Fi") == "Fi"
# Verify type-checking for %typemap(in) std::string {}
exceptionRaised = false
begin
test_value_in(0)
rescue TypeError
exceptionRaised = true
ensure
raise RuntimeError unless exceptionRaised
end
# Checking expected use of %typemap(in) const std::string & {}
test_const_reference_in("Fo")
# Verify type-checking for %typemap(in) const std::string & {}
exceptionRaised = false
begin
test_const_reference_in(0)
rescue TypeError
exceptionRaised = true
ensure
raise RuntimeError unless exceptionRaised
end