Back to index

python3.2  3.2.2
Public Member Functions
ctypes.test.test_prototypes.WCharPointersTestCase Class Reference

List of all members.

Public Member Functions

def setUp
def test_POINTER_c_wchar_arg
def test_c_wchar_p_arg

Detailed Description

Definition at line 164 of file test_prototypes.py.


Member Function Documentation

Definition at line 166 of file test_prototypes.py.

00166 
00167         def setUp(self):
00168             func = testdll._testfunc_p_p
00169             func.restype = c_int
00170             func.argtypes = None
00171 

Here is the caller graph for this function:

Definition at line 187 of file test_prototypes.py.

00187 
00188         def test_c_wchar_p_arg(self):
00189             func = testdll._testfunc_p_p
00190             func.restype = c_wchar_p
00191             func.argtypes = c_wchar_p,
00192 
00193             c_wchar_p.from_param("123")
00194 
00195             self.assertEqual(None, func(None))
00196             self.assertEqual("123", func("123"))
00197             self.assertEqual(None, func(c_wchar_p(None)))
00198             self.assertEqual("123", func(c_wchar_p("123")))
00199 
00200             # XXX Currently, these raise TypeErrors, although they shouldn't:
00201             self.assertEqual("123", func(c_wbuffer("123")))
00202             ca = c_wchar("a")
00203             self.assertEqual("a", func(pointer(ca))[0])
00204             self.assertEqual("a", func(byref(ca))[0])

Here is the call graph for this function:

Definition at line 172 of file test_prototypes.py.

00172 
00173         def test_POINTER_c_wchar_arg(self):
00174             func = testdll._testfunc_p_p
00175             func.restype = c_wchar_p
00176             func.argtypes = POINTER(c_wchar),
00177 
00178             self.assertEqual(None, func(None))
00179             self.assertEqual("123", func("123"))
00180             self.assertEqual(None, func(c_wchar_p(None)))
00181             self.assertEqual("123", func(c_wchar_p("123")))
00182 
00183             self.assertEqual("123", func(c_wbuffer("123")))
00184             ca = c_wchar("a")
00185             self.assertEqual("a", func(pointer(ca))[0])
00186             self.assertEqual("a", func(byref(ca))[0])

Here is the call graph for this function:


The documentation for this class was generated from the following file: