Commits

Maciej Fijalkowski  committed 508da8d

make sure we test the actual specialization

  • Participants
  • Parent commits f5edb27
  • Branches autoreds

Comments (0)

Files changed (1)

File pypy/jit/metainterp/test/test_warmspot.py

                 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