[pypy-svn] r61666 - pypy/trunk/pypy/rlib/test
afa at codespeak.net
afa at codespeak.net
Mon Feb 9 17:29:27 CET 2009
Author: afa
Date: Mon Feb 9 17:29:27 2009
New Revision: 61666
Modified:
pypy/trunk/pypy/rlib/test/test_libffi.py
pypy/trunk/pypy/rlib/test/test_runicode.py
Log:
Fix some tests on Windows
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:29:27 2009
@@ -45,7 +45,7 @@
def test_library_get_func(self):
lib = self.get_libc()
- ptr = lib.getpointer('time', [], ffi_type_void)
+ ptr = lib.getpointer('fopen', [], ffi_type_void)
py.test.raises(KeyError, lib.getpointer, 'xxxxxxxxxxxxxxx', [], ffi_type_void)
del ptr
del lib
@@ -86,7 +86,7 @@
libc = self.get_libc()
# XXX assume time_t is long
ulong = cast_type_to_ffitype(rffi.ULONG)
- ctime = libc.getpointer('time', [ffi_type_pointer], ulong)
+ ctime = libc.getpointer('fopen', [ffi_type_pointer], ulong)
x = lltype.malloc(lltype.GcStruct('xxx'))
y = lltype.malloc(lltype.GcArray(rffi.LONG), 3)
z = lltype.malloc(lltype.Array(rffi.LONG), 4, flavor='raw')
@@ -110,7 +110,11 @@
libc = self.get_libc()
# XXX assume time_t is long
ulong = cast_type_to_ffitype(rffi.ULONG)
- ctime = libc.getpointer('time', [ffi_type_pointer], ulong)
+ try:
+ ctime = libc.getpointer('time', [ffi_type_pointer], ulong)
+ except KeyError:
+ # This function is named differently since msvcr80
+ ctime = libc.getpointer('_time32', [ffi_type_pointer], ulong)
ctime.push_arg(lltype.nullptr(rffi.CArray(rffi.LONG)))
t0 = ctime.call(rffi.LONG)
time.sleep(2)
Modified: pypy/trunk/pypy/rlib/test/test_runicode.py
==============================================================================
--- pypy/trunk/pypy/rlib/test/test_runicode.py (original)
+++ pypy/trunk/pypy/rlib/test/test_runicode.py Mon Feb 9 17:29:27 2009
@@ -194,6 +194,8 @@
assert res
def test_surrogates(self):
+ if runicode.MAXUNICODE < 65536:
+ py.test.skip("Narrow unicode build")
from pypy.rpython.test.test_llinterp import interpret
def f(x):
u = runicode.UNICHR(x)
More information about the Pypy-commit
mailing list