[pypy-commit] pypy default: Fix: if expected_ops contains a '...' line, the resulting line numbers got out of sync.
arigo
noreply at buildbot.pypy.org
Tue Dec 13 22:29:37 CET 2011
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r50478:4d738293f0a9
Date: 2011-12-13 22:10 +0100
http://bitbucket.org/pypy/pypy/changeset/4d738293f0a9/
Log: Fix: if expected_ops contains a '...' line, the resulting line
numbers got out of sync.
diff --git a/pypy/module/pypyjit/test_pypy_c/model.py b/pypy/module/pypyjit/test_pypy_c/model.py
--- a/pypy/module/pypyjit/test_pypy_c/model.py
+++ b/pypy/module/pypyjit/test_pypy_c/model.py
@@ -409,7 +409,7 @@
"""
iter_exp_ops = iter(expected_ops)
iter_ops = RevertableIterator(self.ops)
- for opindex, exp_op in enumerate(iter_exp_ops):
+ for exp_op in iter_exp_ops:
try:
if exp_op == '...':
# loop until we find an operation which matches
@@ -430,7 +430,7 @@
if exp_op[4] is False: # optional operation
iter_ops.revert_one()
continue # try to match with the next exp_op
- e.opindex = opindex
+ e.opindex = iter_ops.index - 1
raise
#
# make sure we exhausted iter_ops
More information about the pypy-commit
mailing list