Commits

Carl Friedrich Bolz  committed c2f3df4

a test for making a guard_value

  • Participants
  • Parent commits 9d0e73e

Comments (0)

Files changed (1)

File rpython/jit/metainterp/optimizeopt/test/test_virtualstate.py

         """
         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)