[pypy-svn] r61665 - pypy/trunk/pypy/rlib/test

afa at codespeak.net afa at codespeak.net
Mon Feb 9 17:28:04 CET 2009


Author: afa
Date: Mon Feb  9 17:28:01 2009
New Revision: 61665

Modified:
   pypy/trunk/pypy/rlib/test/test_libffi.py
Log:
Add a test


Modified: pypy/trunk/pypy/rlib/test/test_libffi.py
==============================================================================
--- pypy/trunk/pypy/rlib/test/test_libffi.py	(original)
+++ pypy/trunk/pypy/rlib/test/test_libffi.py	Mon Feb  9 17:28:01 2009
@@ -98,6 +98,14 @@
         lltype.free(z, flavor='raw')
         # allocation check makes no sense, since we've got GcStructs around
 
+    def test_unichar(self):
+        from pypy.rlib.runicode import MAXUNICODE
+        wchar = cast_type_to_ffitype(lltype.UniChar)
+        if MAXUNICODE > 65535:
+            assert wchar is ffi_type_uint32
+        else:
+            assert wchar is ffi_type_uint16
+
     def test_call_time(self):
         libc = self.get_libc()
         # XXX assume time_t is long



More information about the Pypy-commit mailing list