[pypy-svn] r69865 - in pypy/trunk/pypy/jit: backend/x86/test metainterp/test
arigo at codespeak.net
arigo at codespeak.net
Thu Dec 3 13:43:48 CET 2009
Author: arigo
Date: Thu Dec 3 13:43:48 2009
New Revision: 69865
Added:
pypy/trunk/pypy/jit/backend/x86/test/test_float.py (contents, props changed)
Modified:
pypy/trunk/pypy/jit/metainterp/test/test_float.py
Log:
More tests for abs().
Added: pypy/trunk/pypy/jit/backend/x86/test/test_float.py
==============================================================================
--- (empty file)
+++ pypy/trunk/pypy/jit/backend/x86/test/test_float.py Thu Dec 3 13:43:48 2009
@@ -0,0 +1,9 @@
+
+import py
+from pypy.jit.backend.x86.test.test_basic import Jit386Mixin
+from pypy.jit.metainterp.test.test_float import FloatTests
+
+class TestFloat(Jit386Mixin, FloatTests):
+ # for the individual tests see
+ # ====> ../../../metainterp/test/test_float.py
+ pass
Modified: pypy/trunk/pypy/jit/metainterp/test/test_float.py
==============================================================================
--- pypy/trunk/pypy/jit/metainterp/test/test_float.py (original)
+++ pypy/trunk/pypy/jit/metainterp/test/test_float.py Thu Dec 3 13:43:48 2009
@@ -1,3 +1,4 @@
+import math
from pypy.jit.metainterp.test.test_basic import LLJitMixin, OOJitMixin
@@ -17,6 +18,15 @@
res = self.interp_operations(f, [12.0])
assert res == 1.0
+ def test_abs(self):
+ def f(a):
+ return abs(a)
+ res = self.interp_operations(f, [-5.25])
+ assert res == 5.25
+ x = 281474976710656.31
+ res = self.interp_operations(f, [x])
+ assert res == x
+
class TestOOtype(FloatTests, OOJitMixin):
pass
More information about the Pypy-commit
mailing list