[pypy-commit] pypy default: Improve tests a bit and fix
fijal
noreply at buildbot.pypy.org
Mon Jun 6 16:36:53 CEST 2011
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch:
Changeset: r44752:04882fd70496
Date: 2011-06-06 16:37 +0200
http://bitbucket.org/pypy/pypy/changeset/04882fd70496/
Log: Improve tests a bit and fix
diff --git a/pypy/jit/tool/oparser.py b/pypy/jit/tool/oparser.py
--- a/pypy/jit/tool/oparser.py
+++ b/pypy/jit/tool/oparser.py
@@ -212,7 +212,7 @@
descr = None
if argspec.strip():
if opname == 'debug_merge_point':
- allargs = argspec.rsplit(', ', 1)
+ allargs = argspec.split(', ', 1)
else:
allargs = [arg for arg in argspec.split(",")
if arg != '']
diff --git a/pypy/jit/tool/test/test_oparser.py b/pypy/jit/tool/test/test_oparser.py
--- a/pypy/jit/tool/test/test_oparser.py
+++ b/pypy/jit/tool/test/test_oparser.py
@@ -141,16 +141,16 @@
def test_debug_merge_point():
x = '''
[]
- debug_merge_point("info", 0)
- debug_merge_point('info', 1)
- debug_merge_point('<some ('other,')> info', 1)
- debug_merge_point('(stuff) #1', 1)
+ debug_merge_point(0, "info")
+ debug_merge_point(1, 'info')
+ debug_merge_point(1, '<some ('other,')> info')
+ debug_merge_point(1, '(stuff) #1')
'''
loop = parse(x)
- assert loop.operations[0].getarg(0)._get_str() == 'info'
- assert loop.operations[1].getarg(0)._get_str() == 'info'
- assert loop.operations[2].getarg(0)._get_str() == "<some ('other,')> info"
- assert loop.operations[3].getarg(0)._get_str() == "(stuff) #1"
+ assert loop.operations[0].getarg(1)._get_str() == 'info'
+ assert loop.operations[1].getarg(1)._get_str() == 'info'
+ assert loop.operations[2].getarg(1)._get_str() == "<some ('other,')> info"
+ assert loop.operations[3].getarg(1)._get_str() == "(stuff) #1"
def test_descr_with_obj_print():
More information about the pypy-commit
mailing list