std_basic_string.i fixes
- Remove python code from octave's std_basic_string.i - Correctly return an error to fix error handling when using std::basic_string in overloaded methods - issue #1171.
This commit is contained in:
parent
0beec3cf73
commit
cd9b7c3c34
6 changed files with 92 additions and 118 deletions
|
|
@ -87,6 +87,24 @@ if li_std_string_extra.test_value_basic2(x) != x:
|
|||
if li_std_string_extra.test_value_basic3(x) != x:
|
||||
raise RuntimeError, "bad string mapping"
|
||||
|
||||
if li_std_string_extra.test_value_basic_overload(x) != x:
|
||||
raise RuntimeError, "bad overload string"
|
||||
|
||||
if li_std_string_extra.test_value_basic_overload(123) != "int":
|
||||
raise RuntimeError, "bad overload int"
|
||||
|
||||
try:
|
||||
li_std_string_extra.test_value_basic_overload([x])
|
||||
raise RuntimeError, "should throw NotImplementedError"
|
||||
except NotImplementedError:
|
||||
pass
|
||||
|
||||
try:
|
||||
li_std_string_extra.test_value_basic_overload([123])
|
||||
raise RuntimeError, "should throw NotImplementedError"
|
||||
except NotImplementedError:
|
||||
pass
|
||||
|
||||
# Global variables
|
||||
s = "initial string"
|
||||
if li_std_string_extra.cvar.GlobalString2 != "global string 2":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue