[pypy-commit] pypy default: a test for making a guard_value
cfbolz
noreply at buildbot.pypy.org
Fri Apr 4 12:24:20 CEST 2014
Author: Carl Friedrich Bolz <cfbolz at 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)
More information about the pypy-commit
mailing list