[pypy-svn] r22679 - pypy/dist/pypy/rpython/rctypes/test

gromit at codespeak.net gromit at codespeak.net
Thu Jan 26 13:10:18 CET 2006


Author: gromit
Date: Thu Jan 26 13:10:17 2006
New Revision: 22679

Modified:
   pypy/dist/pypy/rpython/rctypes/test/test_rctypes.py
Log:
ADD: Another test, that annotates a non constant ctypes' basic type.

Modified: pypy/dist/pypy/rpython/rctypes/test/test_rctypes.py
==============================================================================
--- pypy/dist/pypy/rpython/rctypes/test/test_rctypes.py	(original)
+++ pypy/dist/pypy/rpython/rctypes/test/test_rctypes.py	Thu Jan 26 13:10:17 2006
@@ -101,6 +101,9 @@
             c_double(1.0)
     )
 
+def py_test_simple_ctypes_non_const():
+    a = 10
+    return c_float( a + 10 )
 
 class Test_rctypes:
 
@@ -213,3 +216,8 @@
         assert s.items[11].knowntype == c_float
         assert s.items[12].knowntype == c_double
 
+    def test_annotate_simple_types_non_const(self):
+        a = RPythonAnnotator()
+        s = a.build_types(py_test_simple_ctypes_non_const,[])
+        assert s.knowntype == c_float
+



More information about the Pypy-commit mailing list