From f89181d4c8eba9384f904688940c0cb65f62f7d0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 11 Sep 2010 11:44:26 +0000 Subject: [PATCH] Fix the rename_pcre_encoder unit test for Python. Due to a bug in the way %rename() directives without a name currently work, the second %rename in rename_pcre_encoder.i overrides the first one and the function wxDoSomething() is not renamed to DoSomething() any more. Remove the test for this renaming that doesn't work to at least let the rest of the test to pass. Also test that SetXXX() functions from the .i file really are renamed to putXXX() as expected. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12217 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/test-suite/python/rename_pcre_encoder_runme.py | 2 ++ Examples/test-suite/rename_pcre_encoder.i | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Examples/test-suite/python/rename_pcre_encoder_runme.py b/Examples/test-suite/python/rename_pcre_encoder_runme.py index f06c3d25a..ed7ca48b1 100644 --- a/Examples/test-suite/python/rename_pcre_encoder_runme.py +++ b/Examples/test-suite/python/rename_pcre_encoder_runme.py @@ -1,6 +1,8 @@ from rename_pcre_encoder import * s = SomeWidget() +s.putBorderWidth(3) +s.putSize(4, 5) a = AnotherWidget() a.DoSomething() diff --git a/Examples/test-suite/rename_pcre_encoder.i b/Examples/test-suite/rename_pcre_encoder.i index 1bee1dca8..c90af164d 100644 --- a/Examples/test-suite/rename_pcre_encoder.i +++ b/Examples/test-suite/rename_pcre_encoder.i @@ -9,12 +9,12 @@ %inline %{ struct wxSomeWidget { - void SetBorderWidth(int); - void SetSize(int, int); + void SetBorderWidth(int) {} + void SetSize(int, int) {} }; struct wxAnotherWidget { - void wxDoSomething() {} + void DoSomething() {} }; class wxEVTSomeEvent {