[pypy-svn] r44956 - in pypy/dist/pypy/rpython/tool: . test
fijal at codespeak.net
fijal at codespeak.net
Thu Jul 12 14:44:11 CEST 2007
Author: fijal
Date: Thu Jul 12 14:44:10 2007
New Revision: 44956
Added:
pypy/dist/pypy/rpython/tool/__init__.py (contents, props changed)
pypy/dist/pypy/rpython/tool/test/__init__.py (contents, props changed)
pypy/dist/pypy/rpython/tool/test/test_mkrffi.py (contents, props changed)
Modified:
pypy/dist/pypy/rpython/tool/ (props changed)
pypy/dist/pypy/rpython/tool/mkrffi.py (contents, props changed)
pypy/dist/pypy/rpython/tool/test/ (props changed)
Log:
Shuffle files around, fixeol
Added: pypy/dist/pypy/rpython/tool/__init__.py
==============================================================================
Modified: pypy/dist/pypy/rpython/tool/mkrffi.py
==============================================================================
--- pypy/dist/pypy/rpython/tool/mkrffi.py (original)
+++ pypy/dist/pypy/rpython/tool/mkrffi.py Thu Jul 12 14:44:10 2007
@@ -23,23 +23,6 @@
if isinstance(value, ctypes._CFuncPtr):
proc_func(value)
-
-def test_func():
-
- lib = ctypes.CDLL('/usr/lib/libc.dylib')
- func = lib.malloc
- func.argtypes = [ctypes.c_int]
- func.restype = ctypes.c_voidp
-
- src = proc_func(func)
- assert isinstance(src, Source)
- _src = Source("""
- c_malloc = rffi.llexternal('malloc', [rffi.INT],
- lltype.Ptr(lltype.FixedSizeArray(lltype.Void, 1)))
- """)
-
- assert src == _src
-
if __name__ == "__main__":
test_1()
Added: pypy/dist/pypy/rpython/tool/test/__init__.py
==============================================================================
Added: pypy/dist/pypy/rpython/tool/test/test_mkrffi.py
==============================================================================
--- (empty file)
+++ pypy/dist/pypy/rpython/tool/test/test_mkrffi.py Thu Jul 12 14:44:10 2007
@@ -0,0 +1,19 @@
+
+import ctypes
+from pypy.rpython.tool.mkrffi import *
+
+def test_func():
+
+ lib = ctypes.CDLL('libc.so.6')
+ func = lib.malloc
+ func.argtypes = [ctypes.c_int]
+ func.restype = ctypes.c_voidp
+
+ src = proc_func(func)
+ assert isinstance(src, Source)
+ _src = Source("""
+ c_malloc = rffi.llexternal('malloc', [rffi.INT],
+ lltype.Ptr(lltype.FixedSizeArray(lltype.Void, 1)))
+ """)
+
+ assert src == _src
More information about the Pypy-commit
mailing list