mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-04 19:10:09 +01:00
Fix != comparison for gdicmn classes. Fixes #15772
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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("""\
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user