[pypy-commit] pypy jit-targets: fix test
hakanardo
noreply at buildbot.pypy.org
Sat Nov 5 16:53:31 CET 2011
Author: Hakan Ardo <hakan at debian.org>
Branch: jit-targets
Changeset: r48787:b04a65021a14
Date: 2011-11-05 16:53 +0100
http://bitbucket.org/pypy/pypy/changeset/b04a65021a14/
Log: fix test
diff --git a/pypy/jit/metainterp/history.py b/pypy/jit/metainterp/history.py
--- a/pypy/jit/metainterp/history.py
+++ b/pypy/jit/metainterp/history.py
@@ -1029,6 +1029,7 @@
insns = loop.summary(adding_insns=insns)
if expected is not None:
insns.pop('debug_merge_point', None)
+ insns.pop('label', None)
assert insns == expected
for insn, expected_count in check.items():
getattr(rop, insn.upper()) # fails if 'rop.INSN' does not exist
diff --git a/pypy/jit/metainterp/test/test_ajit.py b/pypy/jit/metainterp/test/test_ajit.py
--- a/pypy/jit/metainterp/test/test_ajit.py
+++ b/pypy/jit/metainterp/test/test_ajit.py
@@ -66,7 +66,7 @@
res = self.interp_operations(f, [8, 98])
assert res == 110
- def test_loop(self):
+ def test_loop_1(self):
myjitdriver = JitDriver(greens = [], reds = ['x', 'y', 'res'])
def f(x, y):
res = 0
@@ -79,7 +79,8 @@
res = self.meta_interp(f, [6, 7])
assert res == 42
self.check_loop_count(1)
- self.check_resops({'jump': 2, 'int_gt': 2, 'int_add': 2, 'guard_true': 2, 'int_sub': 2})
+ self.check_resops({'jump': 1, 'int_gt': 2, 'int_add': 2,
+ 'guard_true': 2, 'int_sub': 2})
if self.basic:
found = 0
@@ -90,7 +91,7 @@
for box in liveboxes:
assert isinstance(box, history.BoxInt)
found += 1
- assert found == 1
+ assert found == 2
def test_loop_variant_mul1(self):
myjitdriver = JitDriver(greens = [], reds = ['y', 'res', 'x'])
More information about the pypy-commit
mailing list