[pypy-svn] r68072 - pypy/branch/floats-via-sse2/pypy/jit/backend/test

fijal at codespeak.net fijal at codespeak.net
Wed Sep 30 23:53:14 CEST 2009


Author: fijal
Date: Wed Sep 30 23:53:09 2009
New Revision: 68072

Modified:
   pypy/branch/floats-via-sse2/pypy/jit/backend/test/runner_test.py
Log:
And a test showing missing case...


Modified: pypy/branch/floats-via-sse2/pypy/jit/backend/test/runner_test.py
==============================================================================
--- pypy/branch/floats-via-sse2/pypy/jit/backend/test/runner_test.py	(original)
+++ pypy/branch/floats-via-sse2/pypy/jit/backend/test/runner_test.py	Wed Sep 30 23:53:09 2009
@@ -241,6 +241,19 @@
              BoxInt(ord('A'))],
             calldescr)
         assert x.value == ord('B')
+        if cpu.supports_floats:
+            def func(f, i):
+                return float(i) + f
+            FPTR = self.Ptr(self.FuncType([lltype.Float, lltype.Signed],
+                                          lltype.Float))
+            func_ptr = llhelper(FPTR, func)
+            FTP = deref(FPTR)
+            calldescr = cpu.calldescrof(FTP, FTP.ARGS, FTP.RESULT)
+            x = cpu.do_call(
+                [self.get_funcbox(cpu, func_ptr),
+                 BoxFloat(3.5), BoxInt(42)],
+                calldescr)
+            assert x.value == 42 + 3.5
 
     def test_call(self):
 



More information about the Pypy-commit mailing list