[ctypes-commit] ctypes/unittests test_prototypes.py,1.6.6.4,1.6.6.5
Brought to you by:
theller
From: Thomas H. <th...@us...> - 2005-10-20 09:25:52
|
Update of /cvsroot/ctypes/ctypes/unittests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10588 Modified Files: Tag: branch_1_0 test_prototypes.py Log Message: Add two tests contributed by Mike Fletcher. Index: test_prototypes.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/unittests/test_prototypes.py,v retrieving revision 1.6.6.4 retrieving revision 1.6.6.5 diff -C2 -d -r1.6.6.4 -r1.6.6.5 *** test_prototypes.py 18 Oct 2005 18:08:24 -0000 1.6.6.4 --- test_prototypes.py 20 Oct 2005 09:25:43 -0000 1.6.6.5 *************** *** 85,88 **** --- 85,106 ---- self.failUnlessEqual("a", func(byref(ca))[0]) + def test_c_glteximage2d( self ): + """Test a failure case from OpenGL-ctypes""" + func = testdll._testfunc_glteximage2d + func.restype = c_uint + func.argtypes = c_uint, c_int, c_int, c_int, c_int, c_int, c_uint, c_uint, c_void_p + + result = func( 0xde1, 0, 1, 32, 32, 0, 0x1909, 0x1401, '' ) + assert result == 0x1401, hex(result) + + def test_c_glteximage2d2( self ): + """Test a failure case from OpenGL-ctypes""" + func = testdll._testfunc_glteximage2d2 + func.restype = c_uint + func.argtypes = c_uint, c_int, c_int, c_int, c_int, c_int, c_uint, c_uint + + result = func( 0xde1, 0, 1, 32, 32, 0, 0x1909, 0x1401) + assert result == 0x1401, hex(result) + def test_c_void_p_arg(self): func = testdll._testfunc_p_p |