[pypy-svn] pypy default: test and fix
antocuni
commits-noreply at bitbucket.org
Thu Feb 24 18:25:53 CET 2011
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch:
Changeset: r42271:2b5341e8ed15
Date: 2011-02-24 18:06 +0100
http://bitbucket.org/pypy/pypy/changeset/2b5341e8ed15/
Log: test and fix
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
@@ -194,8 +194,11 @@
opname = opname.strip()
assert args.endswith(')')
args = args[:-1]
- args = args.split(',')
- args = map(str.strip, args)
+ if args:
+ args = args.split(',')
+ args = map(str.strip, args)
+ else:
+ args = []
return opname, resvar, args
@classmethod
diff --git a/pypy/module/pypyjit/test_pypy_c/test_model.py b/pypy/module/pypyjit/test_pypy_c/test_model.py
--- a/pypy/module/pypyjit/test_pypy_c/test_model.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_model.py
@@ -115,6 +115,8 @@
assert res == ("int_add", "a", ["b", "3"])
res = OpMatcher.parse_op("guard_true(a)")
assert res == ("guard_true", None, ["a"])
+ res = OpMatcher.parse_op("force_token()")
+ assert res == ("force_token", None, [])
def test_exact_match(self):
loop = """
More information about the Pypy-commit
mailing list