Commit Graph

13 Commits

Author SHA1 Message Date
Gareth Francis 6db3ab0d05 Add test for wchar_t members to li_std_string.i 2020-09-12 17:04:28 +01:00
William S Fulton 66df0bd224 Convert python test scripts to be Python 2 and 3 compatible
Unicode testing
2020-08-15 00:09:31 +01:00
William S Fulton a9a7b03ba6 Split testcases li_std_wstring.i and li_std_wstring_inherit.i
Not many languages have support for std_wstring.i, so disable testing
for these languages until added.
2019-07-22 19:05:21 +01:00
William S Fulton e96316bf31 Fix seg fault using Python 2 invalid utf-8 strings and wstring
Fixes seg fault when passing a Python string, containing invalid utf-8 content,
to a wstring or wchar * parameter.  A TypeError is thrown instead, eg:

  %include <std_wstring.i>
  void instring(const std::wstring& s);

  instring(b"h\xe9llooo") # Python
2018-06-15 19:39:12 +01:00
Jon Schlueter b77f3afafb autopep8 cleanup of Examples/test-suite/python
automated cleanup of python pep8 whitespace compliance
2015-05-08 21:35:52 -04:00
William S Fulton 9f1b051c16 Bypass Python tests failing with -builtin
Reverse operators not supported in builtin types
2014-10-07 20:58:39 +01:00
William S Fulton ace8fcd972 SWIG_AsWCharPtrAndSize improper operation if cptr NULL
SF bug #1327

This doesn't have any noticeable effect with the usage of
SWIG_AsWCharPtrAndSize as shipped by SWIG, but could be a problem if a
user is using this function with cptr equal to zero and psize is non-zero
 - the length would be incorrectly set due to the call to PyUnicode_GetSize
failing.
2013-07-02 18:58:56 +01:00
Stefan Zager 0cdf8658c7 Final merge from trunk
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12595 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-03 07:37:35 +00:00
Stefan Zager 002598680e This commit contains all changes to the regression tests which
are necessitated by the -builtin option.  Notes on individual tests
follow.

grouping_runme.py : 'cvar' syntax for class variables is obsolete.

li_std_string_extra_runme.py :
li_std_wstring_runme.py : Reverse binary operators (e.g., __radd__)
are not supported.

threads_exception_runme.py :
director_exception_runme.py :
exception_order_runme.py : Throwing wrapped objects as exceptions
is not supported.

default_constructor_runme.py : Redundant functional interface
(e.g., 'module.new_Foo()' for 'module.Foo()') is not provided.

python_nondynamic_runme.py : I believe that this test script doesn't
actually test the %pythonnondynamic feature correctly, and I believe
that the feature itself is implemented incorrectly.  With the -builtin
option, %pythonnondynamic *is* implemented correctly, and I have
modified the test script to exercise it correctly.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12416 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-30 04:13:58 +00:00
Marcelo Matus 7b7ad0541c change runtime examples to run with old python versions
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8376 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-11 23:06:15 +00:00
Marcelo Matus 7e5e4fd1f9 massive typemap unification
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7676 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-18 13:24:15 +00:00
William S Fulton a56d3a46bf lib_xxx renamed to li_xxx
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6599 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-01 23:35:08 +00:00
William S Fulton dc903c677a lib_xxxx tests renamed to li_xxxx as a workaround in glib which Mono C# uses - libraries wont be loaded if they start with lib
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6591 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-01 22:56:31 +00:00