Files
Phoenix/unittests/test_defs.py
Robin Dunn c96d31f919 Instead of hacking the generated C++ after the fact,
generate the sip code a little differently for the int tricky constants,
and add some tests.
2016-05-07 01:27:28 -07:00

30 lines
907 B
Python

import imp_unittest, unittest
import wtc
import wx
#---------------------------------------------------------------------------
class defs_Tests(wtc.WidgetTestCase):
def test_constants1(self):
# These constants are not plain int's
self.assertEqual(wx.UINT32_MAX, 2**32-1)
self.assertEqual(wx.INT64_MIN, (-9223372036854775807)-1)
self.assertEqual(wx.INT64_MAX, 9223372036854775807)
self.assertEqual(wx.UINT64_MAX, 0xFFFFFFFFFFFFFFFF)
def test_constants2(self):
# These constants needed some special tweaking. Make sure it
# was done right.
self.assertEqual(wx.VSCROLL, -2147483648)
self.assertEqual(wx.CANCEL_DEFAULT, -2147483648)
self.assertEqual(wx.WINDOW_STYLE_MASK, -65536)
#---------------------------------------------------------------------------
if __name__ == '__main__':
unittest.main()