[ctypes-commit] ctypes/unittests test_slicing.py,1.2,1.3
Brought to you by:
theller
From: Thomas H. <th...@us...> - 2004-10-12 19:12:10
|
Update of /cvsroot/ctypes/ctypes/unittests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12630 Modified Files: test_slicing.py Log Message: Adapt the test for different sizes of wchar_t. Index: test_slicing.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/unittests/test_slicing.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_slicing.py 18 Aug 2004 12:58:32 -0000 1.2 --- test_slicing.py 12 Oct 2004 19:11:52 -0000 1.3 *************** *** 84,88 **** res, 0, 5, u"abcde") ! dll.my_wcsdup.restype = POINTER(c_short) res = dll.my_wcsdup(s) self.failUnlessEqual(res[:len(s)-1], range(ord("a"), ord("z")+1)) --- 84,93 ---- res, 0, 5, u"abcde") ! if sizeof(c_wchar) == sizeof(c_short): ! dll.my_wcsdup.restype = POINTER(c_short) ! elif sizeof(c_wchar) == sizeof(c_int): ! dll.my_wcsdup.restype = POINTER(c_int) ! elif sizeof(c_wchar) == sizeof(c_long): ! dll.my_wcsdup.restype = POINTER(c_long) res = dll.my_wcsdup(s) self.failUnlessEqual(res[:len(s)-1], range(ord("a"), ord("z")+1)) |