[pypy-svn] r64074 - pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test

fijal at codespeak.net fijal at codespeak.net
Tue Apr 14 20:23:55 CEST 2009


Author: fijal
Date: Tue Apr 14 20:23:55 2009
New Revision: 64074

Modified:
   pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_loop.py
Log:
ok, rewrite the test in a way that more resembles what pypy is doing.


Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_loop.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_loop.py	(original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_loop.py	Tue Apr 14 20:23:55 2009
@@ -506,14 +506,15 @@
 
 
     def test_path_with_operations_not_from_start_2(self):
-        py.test.skip("invalid hint??")
+        py.test.skip("FAILING, FIX IT, FIX IT, FIX IT")
         jitdriver = JitDriver(greens = ['k'], reds = ['n', 'z'])
 
-        def some_fn(n, k, z):
-            # XXX I may be missing the point of this test, but as such it
-            # is an invalid hint: why pass "n+1" as "n" here, when the
-            # next jit_merge_point is seeing really "n"?
-            jitdriver.can_enter_jit(n=n+1, k=k, z=z)
+        class Stuff(object):
+            def __init__(self, n):
+                self.n = n
+
+        def some_fn(stuff, k, z):
+            jitdriver.can_enter_jit(n=stuff.n, k=k, z=z)
 
         def f(n):
             k = 0
@@ -529,6 +530,6 @@
                         k = 15
                         z = 0
                 n -= 1
-                some_fn(n, k, z)
+                some_fn(Stuff(n), k, z)
 
         res = self.meta_interp(f, [200])



More information about the Pypy-commit mailing list