fixes for new name
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6605 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
6fc0b75d9e
commit
cda03e616f
1 changed files with 15 additions and 15 deletions
|
|
@ -1,32 +1,32 @@
|
|||
use lib_std_string;
|
||||
use li_std_string;
|
||||
|
||||
|
||||
# Checking expected use of %typemap(in) std::string {}
|
||||
lib_std_string::test_value("Fee");
|
||||
li_std_string::test_value("Fee");
|
||||
|
||||
# Checking expected result of %typemap(out) std::string {}
|
||||
if (lib_std_string::test_value("Fi") != "Fi") {
|
||||
if (li_std_string::test_value("Fi") != "Fi") {
|
||||
die "Test 1 failed";
|
||||
}
|
||||
|
||||
###### passing undef seems to work - surely it should fail ????
|
||||
# Verify type-checking for %typemap(in) std::string {}
|
||||
#eval { lib_std_string::test_value(undef) };
|
||||
#eval { li_std_string::test_value(undef) };
|
||||
#if (!$@) {
|
||||
# die "Test 2 failed";
|
||||
#}
|
||||
|
||||
# Checking expected use of %typemap(in) const std::string & {}
|
||||
lib_std_string::test_const_reference("Fo");
|
||||
li_std_string::test_const_reference("Fo");
|
||||
|
||||
# Checking expected result of %typemap(out) const std::string& {}
|
||||
if (lib_std_string::test_const_reference("Fum") != "Fum") {
|
||||
if (li_std_string::test_const_reference("Fum") != "Fum") {
|
||||
die "Test 3 failed";
|
||||
}
|
||||
|
||||
###### passing undef seems to work - surely it should fail ????
|
||||
# Verify type-checking for %typemap(in) const std::string & {}
|
||||
#eval { lib_std_string::test_const_reference(undef) };
|
||||
#eval { li_std_string::test_const_reference(undef) };
|
||||
#if (!$@) {
|
||||
# die "Test 4 failed";
|
||||
#}
|
||||
|
|
@ -39,24 +39,24 @@ if (lib_std_string::test_const_reference("Fum") != "Fum") {
|
|||
|
||||
my $stringPtr = undef;
|
||||
|
||||
$stringPtr = lib_std_string::test_pointer_out();
|
||||
$stringPtr = li_std_string::test_pointer_out();
|
||||
|
||||
lib_std_string::test_pointer($stringPtr);
|
||||
li_std_string::test_pointer($stringPtr);
|
||||
|
||||
$stringPtr = lib_std_string::test_const_pointer_out();
|
||||
$stringPtr = li_std_string::test_const_pointer_out();
|
||||
|
||||
lib_std_string::test_const_pointer($stringPtr);
|
||||
li_std_string::test_const_pointer($stringPtr);
|
||||
|
||||
$stringPtr = lib_std_string::test_reference_out();
|
||||
$stringPtr = li_std_string::test_reference_out();
|
||||
|
||||
lib_std_string::test_reference($stringPtr);
|
||||
li_std_string::test_reference($stringPtr);
|
||||
|
||||
# Check throw exception specification
|
||||
eval { lib_std_string::test_throw() };
|
||||
eval { li_std_string::test_throw() };
|
||||
if (!$@) {
|
||||
die "Test 5 failed";
|
||||
}
|
||||
eval { lib_std_string::test_const_reference_throw() };
|
||||
eval { li_std_string::test_const_reference_throw() };
|
||||
if (!$@) {
|
||||
die "Test 6 failed";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue