diff --git a/etg/gdicmn.py b/etg/gdicmn.py index f0815314..5114b227 100644 --- a/etg/gdicmn.py +++ b/etg/gdicmn.py @@ -86,7 +86,7 @@ def run(): # sequences. c.addCppMethod('bool', '__eq__', '(const wxPoint& other)', body="return *self == *other;") - c.addCppMethod('bool', '__neq__', '(const wxPoint& other)', + c.addCppMethod('bool', '__ne__', '(const wxPoint& other)', body="return *self != *other;") c.addItem(etgtools.WigCode("""\ @@ -153,7 +153,7 @@ def run(): c.addCppMethod('bool', '__eq__', '(const wxSize& other)', body="return *self == *other;") - c.addCppMethod('bool', '__neq__', '(const wxSize& other)', + c.addCppMethod('bool', '__ne__', '(const wxSize& other)', body="return *self != *other;") c.addItem(etgtools.WigCode("""\ @@ -219,7 +219,7 @@ def run(): c.addCppMethod('bool', '__eq__', '(const wxRect& other)', body="return *self == *other;") - c.addCppMethod('bool', '__neq__', '(const wxRect& other)', + c.addCppMethod('bool', '__ne__', '(const wxRect& other)', body="return *self != *other;") c.addItem(etgtools.WigCode("""\ @@ -288,7 +288,7 @@ def run(): c.addCppMethod('bool', '__eq__', '(const wxRealPoint& other)', body="return *self == *other;") - c.addCppMethod('bool', '__neq__', '(const wxRealPoint& other)', + c.addCppMethod('bool', '__ne__', '(const wxRealPoint& other)', body="return *self != *other;") c.addItem(etgtools.WigCode("""\ diff --git a/unittests/test_gdicmn.py b/unittests/test_gdicmn.py index 3c9a5db4..c10cebc8 100644 --- a/unittests/test_gdicmn.py +++ b/unittests/test_gdicmn.py @@ -69,6 +69,16 @@ class Point(unittest.TestCase): p = p1 / 5 p1 += p2 p1 -= p2 + + def test_operators2(self): + p1 = wx.Point(4,5) + p2 = wx.Point(4,5) + p3 = wx.Point(9,9) + self.assertTrue(p1 == p2) + self.assertFalse(p1 != p2) + self.assertFalse(p1 == p3) + self.assertTrue(p1 != p3) + def test_magic(self): p = wx.Point(5,6)