Author: Maciej Fijalkowski <[email protected]>
Branch: autoreds
Changeset: r58912:508da8dba5c3
Date: 2012-11-14 14:10 +0100
http://bitbucket.org/pypy/pypy/changeset/508da8dba5c3/

Log:    make sure we test the actual specialization

diff --git a/pypy/jit/metainterp/test/test_warmspot.py 
b/pypy/jit/metainterp/test/test_warmspot.py
--- a/pypy/jit/metainterp/test/test_warmspot.py
+++ b/pypy/jit/metainterp/test/test_warmspot.py
@@ -401,16 +401,27 @@
                 self.cur += 1
                 return self.cur
 
+        def one():
+            res = 0
+            for i in MyRange(10):
+                res += i
+            return res
+
+        def two():
+            res = 0
+            for i in MyRange(13):
+                res += i * 2
+            return res
+
         def f(n, m):
-            res = 0
-            for i in MyRange(100):
-                res += i
+            res = one() * 100
+            res += two()
             return res
         expected = f(21, 5)
         res = self.meta_interp(f, [21, 5])
         assert res == expected
-        self.check_resops(int_eq=2, int_add=4)
-
+        self.check_resops(int_eq=4, int_add=8)
+        self.check_trace_count(2)
 
 class TestLLWarmspot(WarmspotTests, LLJitMixin):
     CPUClass = runner.LLtypeCPU
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to