Author: Maciej Fijalkowski <[email protected]> Branch: callback-jit Changeset: r59648:0969449422fb Date: 2013-01-02 12:11 +0200 http://bitbucket.org/pypy/pypy/changeset/0969449422fb/
Log: a failing test diff --git a/pypy/jit/metainterp/test/test_call.py b/pypy/jit/metainterp/test/test_call.py new file mode 100644 --- /dev/null +++ b/pypy/jit/metainterp/test/test_call.py @@ -0,0 +1,27 @@ + +from pypy.jit.metainterp.test.support import LLJitMixin +from pypy.rlib import jit + +class TestCall(LLJitMixin): + def test_indirect_call(self): + @jit.dont_look_inside + def f1(x): + return x + 1 + + @jit.dont_look_inside + def f2(x): + return x + 2 + + @jit.dont_look_inside + def choice(i): + if i: + return f1 + return f2 + + def f(i): + func = choice(i) + return func(i) + + res = self.interp_operations(f, [3]) + assert res == f(3) + _______________________________________________ pypy-commit mailing list [email protected] http://mail.python.org/mailman/listinfo/pypy-commit
