[pypy-svn] r65379 - pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/test
fijal at codespeak.net
fijal at codespeak.net
Sun May 24 16:44:11 CEST 2009
Author: fijal
Date: Sun May 24 16:44:09 2009
New Revision: 65379
Modified:
pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/test/oparser.py
pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/test/test_oparser.py
Log:
A test and a fix
Modified: pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/test/oparser.py
==============================================================================
--- pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/test/oparser.py (original)
+++ pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/test/oparser.py Sun May 24 16:44:09 2009
@@ -140,7 +140,7 @@
ops[-1].suboperations = suboperations
else:
ops.append(self.parse_next_op(lines[num].strip()))
- num += 1
+ num += 1
return num, ops
def parse_inpargs(self, line):
Modified: pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/test/test_oparser.py
==============================================================================
--- pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/test/test_oparser.py (original)
+++ pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/test/test_oparser.py Sun May 24 16:44:09 2009
@@ -42,3 +42,13 @@
stuff = Xyz()
loop = parse(x, None, locals())
assert loop.operations[0].descr is stuff
+
+def test_after_fail():
+ x = """
+ [i0]
+ guard_value(i0, 3)
+ fail()
+ i1 = int_add(1, 2)
+ """
+ loop = parse(x, None, {})
+ assert len(loop.operations) == 2
More information about the Pypy-commit
mailing list