[pypy-svn] r51276 - pypy/dist/pypy/translator/cli/test
antocuni at codespeak.net
antocuni at codespeak.net
Mon Feb 4 23:47:51 CET 2008
Author: antocuni
Date: Mon Feb 4 23:47:51 2008
New Revision: 51276
Modified:
pypy/dist/pypy/translator/cli/test/runtest.py
pypy/dist/pypy/translator/cli/test/test_runtest.py
Log:
don't fail when having more than 8 arguments
Modified: pypy/dist/pypy/translator/cli/test/runtest.py
==============================================================================
--- pypy/dist/pypy/translator/cli/test/runtest.py (original)
+++ pypy/dist/pypy/translator/cli/test/runtest.py Mon Feb 4 23:47:51 2008
@@ -67,7 +67,7 @@
# convert string arguments to their true type
for i, arg in enumerate(self.graph.getargs()):
ilasm.opcode('ldarg.0')
- ilasm.opcode('ldc.i4.%d' % i)
+ ilasm.opcode('ldc.i4 %d' % i)
ilasm.opcode('ldelem.ref')
arg_type, arg_var = self.cts.llvar_to_cts(arg)
ilasm.call('%s class [mscorlib]System.Convert::%s(string)' %
Modified: pypy/dist/pypy/translator/cli/test/test_runtest.py
==============================================================================
--- pypy/dist/pypy/translator/cli/test/test_runtest.py (original)
+++ pypy/dist/pypy/translator/cli/test/test_runtest.py Mon Feb 4 23:47:51 2008
@@ -9,3 +9,10 @@
raise ValueError
f = self._compile(fn, [], auto_raise_exc=True)
py.test.raises(ValueError, f)
+
+ def test_big_arglist(self):
+ def fn(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9):
+ return a0
+ res = self.interpret(fn, [42]*10)
+ assert res == 42
+
More information about the Pypy-commit
mailing list