Author: Carl Friedrich Bolz <cfb...@gmx.de> Branch: Changeset: r70431:c2f3df441d50 Date: 2014-04-04 12:23 +0200 http://bitbucket.org/pypy/pypy/changeset/c2f3df441d50/
Log: a test for making a guard_value diff --git a/rpython/jit/metainterp/optimizeopt/test/test_virtualstate.py b/rpython/jit/metainterp/optimizeopt/test/test_virtualstate.py --- a/rpython/jit/metainterp/optimizeopt/test/test_virtualstate.py +++ b/rpython/jit/metainterp/optimizeopt/test/test_virtualstate.py @@ -202,6 +202,17 @@ """ self.compare(guards, expected, [box]) + def test_known_value(self): + value1 = OptValue(self.nodebox) + value1.make_constant(ConstInt(1)) + box = self.nodebox + guards = value1.make_guards(box) + expected = """ + [i0] + guard_value(i0, 1) [] + """ + self.compare(guards, expected, [box]) + def test_equal_inputargs(self): value = OptValue(self.nodebox) classbox = self.cpu.ts.cls_of_box(self.nodebox) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit